{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## pandas数据结构"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd # pandas基于NumPy，升级"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### Series"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3, 4, 5])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "0    1\n",
       "1    2\n",
       "2    3\n",
       "3    4\n",
       "4    5\n",
       "dtype: int64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Series\n",
    "l = np.array([1,2,3,4,5]) # NumPy数组\n",
    "\n",
    "s1 = pd.Series(data = l)\n",
    "display(l,s1) # Series是一维的数组，和NumPy数组不一样：Series多了索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "i      1\n",
       "ii     2\n",
       "iii    3\n",
       "iv     4\n",
       "v      5\n",
       "dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s2 = pd.Series(data = l, index = ['i','ii','iii','iv','v'])\n",
    "s2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A    149\n",
       "B    130\n",
       "C    118\n",
       "D     99\n",
       "E     66\n",
       "dtype: int64"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s3 = pd.Series(data = {'A':149,'B':130,'C':118,'D':99,'E':66})\n",
    "s3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### DataFrame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>34.0</td>\n",
       "      <td>43.0</td>\n",
       "      <td>24.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>78.0</td>\n",
       "      <td>49.0</td>\n",
       "      <td>11.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>4.0</td>\n",
       "      <td>88.0</td>\n",
       "      <td>85.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>25.0</td>\n",
       "      <td>46.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>115.0</td>\n",
       "      <td>129.0</td>\n",
       "      <td>145.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>12.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>88.0</td>\n",
       "      <td>127.0</td>\n",
       "      <td>141.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>51.0</td>\n",
       "      <td>57.0</td>\n",
       "      <td>99.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>109.0</td>\n",
       "      <td>73.0</td>\n",
       "      <td>133.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>113.0</td>\n",
       "      <td>104.0</td>\n",
       "      <td>7.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python   Math     En\n",
       "A    34.0   43.0   24.0\n",
       "B    78.0   49.0   11.0\n",
       "C     4.0   88.0   85.0\n",
       "D    25.0   46.0    4.0\n",
       "E   115.0  129.0  145.0\n",
       "F    12.0   10.0   63.0\n",
       "H    88.0  127.0  141.0\n",
       "I    51.0   57.0   99.0\n",
       "J   109.0   73.0  133.0\n",
       "K   113.0  104.0    7.0"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Series是一维的，功能比较少\n",
    "# DataFrame是二维的，多个Series公用索引，组成了DataFrame\n",
    "# 像不像 Excel，所有数据，结构化\n",
    "df1 = pd.DataFrame(data = np.random.randint(0,151,size = (10,3)),\n",
    "                   index = list('ABCDEFHIJK'), # 行索引\n",
    "                   columns=['Python','Math','En'],dtype=np.float16) # 列索引\n",
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>66</td>\n",
       "      <td>88</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>99</td>\n",
       "      <td>65</td>\n",
       "      <td>121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>128</td>\n",
       "      <td>137</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "0      66    88  100\n",
       "1      99    65  121\n",
       "2     128   137   45"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(data = {'Python':[66,99,128],'Math':[88,65,137],'En':[100,121,45]})\n",
    "df2 # 字典，key作为列索引，不指定index默认从0开始索引，自动索引一样"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据查看"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>45</td>\n",
       "      <td>120</td>\n",
       "      <td>112</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>99</td>\n",
       "      <td>2</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>91</td>\n",
       "      <td>28</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>9</td>\n",
       "      <td>16</td>\n",
       "      <td>93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>50</td>\n",
       "      <td>55</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>111</td>\n",
       "      <td>74</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>117</td>\n",
       "      <td>56</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>12</td>\n",
       "      <td>82</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>123</td>\n",
       "      <td>31</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>42</td>\n",
       "      <td>138</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0       45   120  112\n",
       "1       99     2   89\n",
       "2       91    28   82\n",
       "3        9    16   93\n",
       "4       50    55   47\n",
       "..     ...   ...  ...\n",
       "95     111    74   83\n",
       "96     117    56   19\n",
       "97      12    82   48\n",
       "98     123    31  100\n",
       "99      42   138  142\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = np.random.randint(0,151,size = (100,3)),\n",
    "                  columns=['Python','Math','En'])\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(100, 3)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape # 查看DataFrame形状"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>45</td>\n",
       "      <td>120</td>\n",
       "      <td>112</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>99</td>\n",
       "      <td>2</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>91</td>\n",
       "      <td>28</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "0      45   120  112\n",
       "1      99     2   89\n",
       "2      91    28   82"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(n = 3) # 显示前N个，默认N = 5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>111</td>\n",
       "      <td>74</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>117</td>\n",
       "      <td>56</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>12</td>\n",
       "      <td>82</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>123</td>\n",
       "      <td>31</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>42</td>\n",
       "      <td>138</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "95     111    74   83\n",
       "96     117    56   19\n",
       "97      12    82   48\n",
       "98     123    31  100\n",
       "99      42   138  142"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.tail() # 显示后n个"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    int64\n",
       "Math      int64\n",
       "En        int64\n",
       "dtype: object"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.dtypes # 数据类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 100 entries, 0 to 99\n",
      "Data columns (total 3 columns):\n",
      " #   Column  Non-Null Count  Dtype\n",
      "---  ------  --------------  -----\n",
      " 0   Python  100 non-null    int64\n",
      " 1   Math    100 non-null    int64\n",
      " 2   En      100 non-null    int64\n",
      "dtypes: int64(3)\n",
      "memory usage: 2.5 KB\n"
     ]
    }
   ],
   "source": [
    "df.info() # 比较详细信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>100.00000</td>\n",
       "      <td>100.000000</td>\n",
       "      <td>100.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>82.77000</td>\n",
       "      <td>70.180000</td>\n",
       "      <td>79.510000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>42.50558</td>\n",
       "      <td>44.446627</td>\n",
       "      <td>42.633864</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>6.00000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>44.50000</td>\n",
       "      <td>31.000000</td>\n",
       "      <td>46.750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>88.00000</td>\n",
       "      <td>74.500000</td>\n",
       "      <td>80.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>123.00000</td>\n",
       "      <td>111.500000</td>\n",
       "      <td>117.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>150.00000</td>\n",
       "      <td>148.000000</td>\n",
       "      <td>149.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python        Math          En\n",
       "count  100.00000  100.000000  100.000000\n",
       "mean    82.77000   70.180000   79.510000\n",
       "std     42.50558   44.446627   42.633864\n",
       "min      6.00000    2.000000    0.000000\n",
       "25%     44.50000   31.000000   46.750000\n",
       "50%     88.00000   74.500000   80.000000\n",
       "75%    123.00000  111.500000  117.250000\n",
       "max    150.00000  148.000000  149.000000"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe() # 描述：平均值、标准差、中位数、四等分、最大值，最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 45, 120, 112],\n",
       "       [ 99,   2,  89],\n",
       "       [ 91,  28,  82],\n",
       "       [  9,  16,  93],\n",
       "       [ 50,  55,  47],\n",
       "       [  7, 119, 139],\n",
       "       [122,  17,  79],\n",
       "       [ 39, 119,  51],\n",
       "       [105,  83, 141],\n",
       "       [ 70,  17, 107],\n",
       "       [ 85,  99, 131],\n",
       "       [ 27,  40,  46],\n",
       "       [ 86,  87,  44],\n",
       "       [  8,  36,  64],\n",
       "       [150,   4, 118],\n",
       "       [ 31,  25,  59],\n",
       "       [ 43,   3,  54],\n",
       "       [123,  20,  13],\n",
       "       [128,  25,  68],\n",
       "       [ 88,  12,  67],\n",
       "       [ 58,  31,  24],\n",
       "       [  6, 145,  19],\n",
       "       [ 86, 147,  12],\n",
       "       [ 88, 128,   6],\n",
       "       [127,  79, 141],\n",
       "       [126, 145, 113],\n",
       "       [ 42,  10,  72],\n",
       "       [ 89, 114,  58],\n",
       "       [ 40, 106, 126],\n",
       "       [138,  82,  13],\n",
       "       [ 43,  92, 118],\n",
       "       [ 84, 125,  57],\n",
       "       [ 67, 115,  34],\n",
       "       [ 28,  60, 117],\n",
       "       [146,  96,   0],\n",
       "       [133,  13,  34],\n",
       "       [106,  76, 115],\n",
       "       [126,  61, 146],\n",
       "       [ 98,  60,  19],\n",
       "       [ 87,  79,  13],\n",
       "       [124,  93, 135],\n",
       "       [140,   7, 105],\n",
       "       [126,  46, 148],\n",
       "       [ 21,  44,  52],\n",
       "       [ 67,  77,  81],\n",
       "       [ 46, 121,  86],\n",
       "       [115,  44, 145],\n",
       "       [143, 118, 134],\n",
       "       [ 21,  15, 133],\n",
       "       [ 68,  96, 139],\n",
       "       [ 15, 115, 119],\n",
       "       [133,  46,  32],\n",
       "       [ 89,  79,  80],\n",
       "       [ 43, 137,  83],\n",
       "       [ 48, 148, 117],\n",
       "       [132,  50,  57],\n",
       "       [ 85, 111, 142],\n",
       "       [ 28,  31, 140],\n",
       "       [ 10,  86,  74],\n",
       "       [105, 133,  61],\n",
       "       [ 78,  22,  21],\n",
       "       [100, 132,  80],\n",
       "       [133,  75,  31],\n",
       "       [ 13,  92,  91],\n",
       "       [134, 113, 149],\n",
       "       [130, 121, 128],\n",
       "       [ 82,  31,  71],\n",
       "       [ 65,  22, 113],\n",
       "       [ 72,  70, 132],\n",
       "       [ 96,  81, 118],\n",
       "       [ 47,   4, 126],\n",
       "       [ 24, 131,  16],\n",
       "       [ 98, 145,  65],\n",
       "       [142,  80,  28],\n",
       "       [100,  28,  29],\n",
       "       [143,  92,  55],\n",
       "       [ 83,   4,  55],\n",
       "       [ 10,  52,  86],\n",
       "       [132,  36,  91],\n",
       "       [138,  34,  97],\n",
       "       [126,  73,  38],\n",
       "       [ 89, 138,  80],\n",
       "       [124,  98,  67],\n",
       "       [135,  83,  18],\n",
       "       [113,  36,  51],\n",
       "       [ 76,   5,  32],\n",
       "       [ 94,   7,  99],\n",
       "       [117,  68,  57],\n",
       "       [ 67,  17, 115],\n",
       "       [ 60,   7, 104],\n",
       "       [ 35, 114,  41],\n",
       "       [  6,  97, 128],\n",
       "       [118,  39,  31],\n",
       "       [113, 145, 147],\n",
       "       [ 96,  57,  65],\n",
       "       [111,  74,  83],\n",
       "       [117,  56,  19],\n",
       "       [ 12,  82,  48],\n",
       "       [123,  31, 100],\n",
       "       [ 42, 138, 142]])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.values # 值，返回的是NumPy数组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['Python', 'Math', 'En'], dtype='object')"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns # 列索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RangeIndex(start=0, stop=100, step=1)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.index # 行索引 0 ~ 99"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据输入与输出"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>134</td>\n",
       "      <td>140</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>64</td>\n",
       "      <td>150</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>85</td>\n",
       "      <td>90</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>29</td>\n",
       "      <td>98</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>91</td>\n",
       "      <td>87</td>\n",
       "      <td>111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>62</td>\n",
       "      <td>130</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>18</td>\n",
       "      <td>86</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>55</td>\n",
       "      <td>89</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>54</td>\n",
       "      <td>78</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>41</td>\n",
       "      <td>100</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0      134   140  108\n",
       "1       64   150   87\n",
       "2       85    90   85\n",
       "3       29    98   66\n",
       "4       91    87  111\n",
       "..     ...   ...  ...\n",
       "95      62   130   29\n",
       "96      18    86  120\n",
       "97      55    89    7\n",
       "98      54    78   25\n",
       "99      41   100   57\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = np.random.randint(0,151,size = (100,3)),\n",
    "                  columns=['Python','Math','En'])\n",
    "df # 行索引，列索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.to_csv('./data.csv',sep = ',',\n",
    "          index = True, # 保存行索引\n",
    "          header=True) # 保存列索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.to_csv('./data2.csv',sep = ',',\n",
    "          index = False, # 不保存行索引\n",
    "          header=False) # 不保存列索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>134</td>\n",
       "      <td>140</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>64</td>\n",
       "      <td>150</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>85</td>\n",
       "      <td>90</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>29</td>\n",
       "      <td>98</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>91</td>\n",
       "      <td>87</td>\n",
       "      <td>111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>62</td>\n",
       "      <td>130</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>18</td>\n",
       "      <td>86</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>55</td>\n",
       "      <td>89</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>54</td>\n",
       "      <td>78</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>41</td>\n",
       "      <td>100</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0      134   140  108\n",
       "1       64   150   87\n",
       "2       85    90   85\n",
       "3       29    98   66\n",
       "4       91    87  111\n",
       "..     ...   ...  ...\n",
       "95      62   130   29\n",
       "96      18    86  120\n",
       "97      55    89    7\n",
       "98      54    78   25\n",
       "99      41   100   57\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_csv('./data.csv',\n",
    "            index_col=0) # 第一列作为行索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>134</td>\n",
       "      <td>140</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>64</td>\n",
       "      <td>150</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>85</td>\n",
       "      <td>90</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>29</td>\n",
       "      <td>98</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>91</td>\n",
       "      <td>87</td>\n",
       "      <td>111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>62</td>\n",
       "      <td>130</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>18</td>\n",
       "      <td>86</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>55</td>\n",
       "      <td>89</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>54</td>\n",
       "      <td>78</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>41</td>\n",
       "      <td>100</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      0    1    2\n",
       "0   134  140  108\n",
       "1    64  150   87\n",
       "2    85   90   85\n",
       "3    29   98   66\n",
       "4    91   87  111\n",
       "..  ...  ...  ...\n",
       "95   62  130   29\n",
       "96   18   86  120\n",
       "97   55   89    7\n",
       "98   54   78   25\n",
       "99   41  100   57\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_csv('./data2.csv',header =None)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### Excel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>134</td>\n",
       "      <td>140</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>64</td>\n",
       "      <td>150</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>85</td>\n",
       "      <td>90</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>29</td>\n",
       "      <td>98</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>91</td>\n",
       "      <td>87</td>\n",
       "      <td>111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>62</td>\n",
       "      <td>130</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>18</td>\n",
       "      <td>86</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>55</td>\n",
       "      <td>89</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>54</td>\n",
       "      <td>78</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>41</td>\n",
       "      <td>100</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0      134   140  108\n",
       "1       64   150   87\n",
       "2       85    90   85\n",
       "3       29    98   66\n",
       "4       91    87  111\n",
       "..     ...   ...  ...\n",
       "95      62   130   29\n",
       "96      18    86  120\n",
       "97      55    89    7\n",
       "98      54    78   25\n",
       "99      41   100   57\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.to_excel('./data.xls')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>134</td>\n",
       "      <td>140</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>64</td>\n",
       "      <td>150</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>85</td>\n",
       "      <td>90</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>29</td>\n",
       "      <td>98</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>91</td>\n",
       "      <td>87</td>\n",
       "      <td>111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>62</td>\n",
       "      <td>130</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>18</td>\n",
       "      <td>86</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>55</td>\n",
       "      <td>89</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>54</td>\n",
       "      <td>78</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>41</td>\n",
       "      <td>100</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0      134   140  108\n",
       "1       64   150   87\n",
       "2       85    90   85\n",
       "3       29    98   66\n",
       "4       91    87  111\n",
       "..     ...   ...  ...\n",
       "95      62   130   29\n",
       "96      18    86  120\n",
       "97      55    89    7\n",
       "98      54    78   25\n",
       "99      41   100   57\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_excel('./data.xls',\n",
    "              index_col=0) # 第一列作为行索引"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### HDF5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.to_hdf('./data.h5',key = 'score')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>计算机</th>\n",
       "      <th>化工</th>\n",
       "      <th>生物</th>\n",
       "      <th>工程</th>\n",
       "      <th>教师</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>35</td>\n",
       "      <td>17</td>\n",
       "      <td>14</td>\n",
       "      <td>66</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>81</td>\n",
       "      <td>29</td>\n",
       "      <td>63</td>\n",
       "      <td>90</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>33</td>\n",
       "      <td>70</td>\n",
       "      <td>54</td>\n",
       "      <td>54</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>79</td>\n",
       "      <td>92</td>\n",
       "      <td>79</td>\n",
       "      <td>95</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>91</td>\n",
       "      <td>6</td>\n",
       "      <td>23</td>\n",
       "      <td>87</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>995</th>\n",
       "      <td>75</td>\n",
       "      <td>31</td>\n",
       "      <td>94</td>\n",
       "      <td>24</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>996</th>\n",
       "      <td>36</td>\n",
       "      <td>67</td>\n",
       "      <td>18</td>\n",
       "      <td>64</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>997</th>\n",
       "      <td>41</td>\n",
       "      <td>83</td>\n",
       "      <td>82</td>\n",
       "      <td>47</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>998</th>\n",
       "      <td>16</td>\n",
       "      <td>87</td>\n",
       "      <td>93</td>\n",
       "      <td>47</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>999</th>\n",
       "      <td>44</td>\n",
       "      <td>73</td>\n",
       "      <td>99</td>\n",
       "      <td>62</td>\n",
       "      <td>99</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     计算机  化工  生物  工程  教师\n",
       "0     35  17  14  66  71\n",
       "1     81  29  63  90  42\n",
       "2     33  70  54  54  40\n",
       "3     79  92  79  95  67\n",
       "4     91   6  23  87  83\n",
       "..   ...  ..  ..  ..  ..\n",
       "995   75  31  94  24  58\n",
       "996   36  67  18  64  25\n",
       "997   41  83  82  47  28\n",
       "998   16  87  93  47  77\n",
       "999   44  73  99  62  99\n",
       "\n",
       "[1000 rows x 5 columns]"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(data = np.random.randint(6,100,size = (1000,5)),\n",
    "                   columns=['计算机','化工','生物','工程','教师'])\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df2.to_hdf('./data.h5',key = 'salary')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>计算机</th>\n",
       "      <th>化工</th>\n",
       "      <th>生物</th>\n",
       "      <th>工程</th>\n",
       "      <th>教师</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>35</td>\n",
       "      <td>17</td>\n",
       "      <td>14</td>\n",
       "      <td>66</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>81</td>\n",
       "      <td>29</td>\n",
       "      <td>63</td>\n",
       "      <td>90</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>33</td>\n",
       "      <td>70</td>\n",
       "      <td>54</td>\n",
       "      <td>54</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>79</td>\n",
       "      <td>92</td>\n",
       "      <td>79</td>\n",
       "      <td>95</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>91</td>\n",
       "      <td>6</td>\n",
       "      <td>23</td>\n",
       "      <td>87</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>995</th>\n",
       "      <td>75</td>\n",
       "      <td>31</td>\n",
       "      <td>94</td>\n",
       "      <td>24</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>996</th>\n",
       "      <td>36</td>\n",
       "      <td>67</td>\n",
       "      <td>18</td>\n",
       "      <td>64</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>997</th>\n",
       "      <td>41</td>\n",
       "      <td>83</td>\n",
       "      <td>82</td>\n",
       "      <td>47</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>998</th>\n",
       "      <td>16</td>\n",
       "      <td>87</td>\n",
       "      <td>93</td>\n",
       "      <td>47</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>999</th>\n",
       "      <td>44</td>\n",
       "      <td>73</td>\n",
       "      <td>99</td>\n",
       "      <td>62</td>\n",
       "      <td>99</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     计算机  化工  生物  工程  教师\n",
       "0     35  17  14  66  71\n",
       "1     81  29  63  90  42\n",
       "2     33  70  54  54  40\n",
       "3     79  92  79  95  67\n",
       "4     91   6  23  87  83\n",
       "..   ...  ..  ..  ..  ..\n",
       "995   75  31  94  24  58\n",
       "996   36  67  18  64  25\n",
       "997   41  83  82  47  28\n",
       "998   16  87  93  47  77\n",
       "999   44  73  99  62  99\n",
       "\n",
       "[1000 rows x 5 columns]"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_hdf('./data.h5',key = 'salary')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### SQL"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "from sqlalchemy import create_engine # 数据库引擎，构建和数据库的连接"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'pymysql'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-30-eb01ab4c46c1>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0;31m# PyMySQL\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      2\u001b[0m \u001b[0;31m# 类似网页地址\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mengine\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcreate_engine\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'mysql+pymysql://root:12345678@localhost/pandas?charset=utf8'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m~/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py\u001b[0m in \u001b[0;36mcreate_engine\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m    498\u001b[0m     \u001b[0mstrategy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"strategy\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdefault_strategy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    499\u001b[0m     \u001b[0mstrategy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstrategies\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstrategies\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mstrategy\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 500\u001b[0;31m     \u001b[0;32mreturn\u001b[0m \u001b[0mstrategy\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    501\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    502\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py\u001b[0m in \u001b[0;36mcreate\u001b[0;34m(self, name_or_url, **kwargs)\u001b[0m\n\u001b[1;32m     85\u001b[0m                 \u001b[0;32mif\u001b[0m \u001b[0mk\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     86\u001b[0m                     \u001b[0mdbapi_args\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpop_kwarg\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 87\u001b[0;31m             \u001b[0mdbapi\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdialect_cls\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdbapi\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mdbapi_args\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     88\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     89\u001b[0m         \u001b[0mdialect_args\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"dbapi\"\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdbapi\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/envs/python3.7/lib/python3.7/site-packages/sqlalchemy/dialects/mysql/pymysql.py\u001b[0m in \u001b[0;36mdbapi\u001b[0;34m(cls)\u001b[0m\n\u001b[1;32m     60\u001b[0m     \u001b[0;34m@\u001b[0m\u001b[0mclassmethod\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     61\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0mdbapi\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcls\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 62\u001b[0;31m         \u001b[0;32mreturn\u001b[0m \u001b[0m__import__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"pymysql\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     63\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     64\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0mis_disconnect\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconnection\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcursor\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'pymysql'"
     ]
    }
   ],
   "source": [
    "# PyMySQL\n",
    "# 类似网页地址\n",
    "engine = create_engine('mysql+pymysql://root:12345678@localhost/pandas?charset=utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df2.to_sql('salary',engine,index=False) # 将Python中数据DataFrame保存到Mysql"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "collapsed": true,
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>计算机</th>\n",
       "      <th>化工</th>\n",
       "      <th>生物</th>\n",
       "      <th>工程</th>\n",
       "      <th>教师</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>64</td>\n",
       "      <td>22</td>\n",
       "      <td>16</td>\n",
       "      <td>68</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>95</td>\n",
       "      <td>47</td>\n",
       "      <td>72</td>\n",
       "      <td>76</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>88</td>\n",
       "      <td>48</td>\n",
       "      <td>92</td>\n",
       "      <td>50</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>75</td>\n",
       "      <td>38</td>\n",
       "      <td>8</td>\n",
       "      <td>63</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>62</td>\n",
       "      <td>14</td>\n",
       "      <td>20</td>\n",
       "      <td>21</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>95</td>\n",
       "      <td>41</td>\n",
       "      <td>84</td>\n",
       "      <td>37</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>34</td>\n",
       "      <td>45</td>\n",
       "      <td>11</td>\n",
       "      <td>93</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>99</td>\n",
       "      <td>10</td>\n",
       "      <td>57</td>\n",
       "      <td>30</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>59</td>\n",
       "      <td>60</td>\n",
       "      <td>12</td>\n",
       "      <td>37</td>\n",
       "      <td>93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>41</td>\n",
       "      <td>58</td>\n",
       "      <td>15</td>\n",
       "      <td>67</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>19</td>\n",
       "      <td>8</td>\n",
       "      <td>63</td>\n",
       "      <td>96</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>75</td>\n",
       "      <td>61</td>\n",
       "      <td>78</td>\n",
       "      <td>49</td>\n",
       "      <td>89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>86</td>\n",
       "      <td>84</td>\n",
       "      <td>31</td>\n",
       "      <td>68</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>42</td>\n",
       "      <td>98</td>\n",
       "      <td>24</td>\n",
       "      <td>20</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>95</td>\n",
       "      <td>15</td>\n",
       "      <td>97</td>\n",
       "      <td>80</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>52</td>\n",
       "      <td>22</td>\n",
       "      <td>44</td>\n",
       "      <td>35</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>67</td>\n",
       "      <td>20</td>\n",
       "      <td>65</td>\n",
       "      <td>24</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>9</td>\n",
       "      <td>46</td>\n",
       "      <td>41</td>\n",
       "      <td>62</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>86</td>\n",
       "      <td>76</td>\n",
       "      <td>80</td>\n",
       "      <td>72</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>61</td>\n",
       "      <td>81</td>\n",
       "      <td>64</td>\n",
       "      <td>26</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>77</td>\n",
       "      <td>92</td>\n",
       "      <td>84</td>\n",
       "      <td>18</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>87</td>\n",
       "      <td>16</td>\n",
       "      <td>75</td>\n",
       "      <td>14</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>23</td>\n",
       "      <td>82</td>\n",
       "      <td>92</td>\n",
       "      <td>42</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>61</td>\n",
       "      <td>89</td>\n",
       "      <td>28</td>\n",
       "      <td>21</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>22</td>\n",
       "      <td>12</td>\n",
       "      <td>38</td>\n",
       "      <td>89</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>77</td>\n",
       "      <td>12</td>\n",
       "      <td>46</td>\n",
       "      <td>89</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>60</td>\n",
       "      <td>45</td>\n",
       "      <td>52</td>\n",
       "      <td>71</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>29</td>\n",
       "      <td>76</td>\n",
       "      <td>94</td>\n",
       "      <td>26</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>14</td>\n",
       "      <td>60</td>\n",
       "      <td>82</td>\n",
       "      <td>88</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>56</td>\n",
       "      <td>36</td>\n",
       "      <td>44</td>\n",
       "      <td>60</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>63</td>\n",
       "      <td>77</td>\n",
       "      <td>43</td>\n",
       "      <td>42</td>\n",
       "      <td>82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>25</td>\n",
       "      <td>71</td>\n",
       "      <td>36</td>\n",
       "      <td>51</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>76</td>\n",
       "      <td>86</td>\n",
       "      <td>87</td>\n",
       "      <td>83</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>93</td>\n",
       "      <td>59</td>\n",
       "      <td>86</td>\n",
       "      <td>25</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>73</td>\n",
       "      <td>40</td>\n",
       "      <td>12</td>\n",
       "      <td>86</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>10</td>\n",
       "      <td>30</td>\n",
       "      <td>54</td>\n",
       "      <td>13</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>9</td>\n",
       "      <td>48</td>\n",
       "      <td>58</td>\n",
       "      <td>75</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>81</td>\n",
       "      <td>41</td>\n",
       "      <td>61</td>\n",
       "      <td>12</td>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>80</td>\n",
       "      <td>68</td>\n",
       "      <td>66</td>\n",
       "      <td>92</td>\n",
       "      <td>84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>53</td>\n",
       "      <td>36</td>\n",
       "      <td>84</td>\n",
       "      <td>26</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>19</td>\n",
       "      <td>62</td>\n",
       "      <td>63</td>\n",
       "      <td>47</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>89</td>\n",
       "      <td>39</td>\n",
       "      <td>91</td>\n",
       "      <td>31</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>57</td>\n",
       "      <td>43</td>\n",
       "      <td>53</td>\n",
       "      <td>48</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>66</td>\n",
       "      <td>16</td>\n",
       "      <td>23</td>\n",
       "      <td>19</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>46</td>\n",
       "      <td>28</td>\n",
       "      <td>78</td>\n",
       "      <td>81</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>38</td>\n",
       "      <td>53</td>\n",
       "      <td>76</td>\n",
       "      <td>49</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>55</td>\n",
       "      <td>94</td>\n",
       "      <td>70</td>\n",
       "      <td>6</td>\n",
       "      <td>44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>56</td>\n",
       "      <td>33</td>\n",
       "      <td>92</td>\n",
       "      <td>17</td>\n",
       "      <td>84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>69</td>\n",
       "      <td>68</td>\n",
       "      <td>23</td>\n",
       "      <td>87</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>12</td>\n",
       "      <td>47</td>\n",
       "      <td>32</td>\n",
       "      <td>80</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    计算机  化工  生物  工程  教师\n",
       "0    64  22  16  68  60\n",
       "1    95  47  72  76  37\n",
       "2    88  48  92  50  37\n",
       "3    75  38   8  63  83\n",
       "4    62  14  20  21  45\n",
       "5    95  41  84  37  16\n",
       "6    34  45  11  93  94\n",
       "7    99  10  57  30  63\n",
       "8    59  60  12  37  93\n",
       "9    41  58  15  67  70\n",
       "10   19   8  63  96  64\n",
       "11   75  61  78  49  89\n",
       "12   86  84  31  68  27\n",
       "13   42  98  24  20  85\n",
       "14   95  15  97  80  87\n",
       "15   52  22  44  35  74\n",
       "16   67  20  65  24  10\n",
       "17    9  46  41  62  66\n",
       "18   86  76  80  72  19\n",
       "19   61  81  64  26   6\n",
       "20   77  92  84  18   7\n",
       "21   87  16  75  14  34\n",
       "22   23  82  92  42  32\n",
       "23   61  89  28  21  40\n",
       "24   22  12  38  89  14\n",
       "25   77  12  46  89  12\n",
       "26   60  45  52  71  67\n",
       "27   29  76  94  26  91\n",
       "28   14  60  82  88  60\n",
       "29   56  36  44  60  37\n",
       "30   63  77  43  42  82\n",
       "31   25  71  36  51  21\n",
       "32   76  86  87  83   8\n",
       "33   93  59  86  25  78\n",
       "34   73  40  12  86  66\n",
       "35   10  30  54  13  71\n",
       "36    9  48  58  75  85\n",
       "37   81  41  61  12  55\n",
       "38   80  68  66  92  84\n",
       "39   53  36  84  26  66\n",
       "40   19  62  63  47  45\n",
       "41   89  39  91  31  86\n",
       "42   57  43  53  48  19\n",
       "43   66  16  23  19  10\n",
       "44   46  28  78  81  21\n",
       "45   38  53  76  49   8\n",
       "46   55  94  70   6  44\n",
       "47   56  33  92  17  84\n",
       "48   69  68  23  87  90\n",
       "49   12  47  32  80  15"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df3 = pd.read_sql('select * from salary limit 50',con = engine)\n",
    "df3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据选取"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 获取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>98</td>\n",
       "      <td>12</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>62</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>85</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>16</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>66</td>\n",
       "      <td>136</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>20</td>\n",
       "      <td>122</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>64</td>\n",
       "      <td>87</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>22</td>\n",
       "      <td>126</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      98    12   15\n",
       "B     104    73  120\n",
       "C     122    62   17\n",
       "D      71    85   80\n",
       "E      99    16   91\n",
       "F     138   116   77\n",
       "H      66   136   16\n",
       "I      20   122   12\n",
       "J      64    87   19\n",
       "K      22   126   39"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,151,size = (10,3)),\n",
    "                  index=list('ABCDEFHIJK'),columns=['Python','Math','En'])\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A     98\n",
       "B    104\n",
       "C    122\n",
       "D     71\n",
       "E     99\n",
       "F    138\n",
       "H     66\n",
       "I     20\n",
       "J     64\n",
       "K     22\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python'] # 获取数据Series"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A     98\n",
       "B    104\n",
       "C    122\n",
       "D     71\n",
       "E     99\n",
       "F    138\n",
       "H     66\n",
       "I     20\n",
       "J     64\n",
       "K     22\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.Python # 属性，DataFrame中列索引，表示属性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>98</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>66</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>20</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>64</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>22</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python   En\n",
       "A      98   15\n",
       "B     104  120\n",
       "C     122   17\n",
       "D      71   80\n",
       "E      99   91\n",
       "F     138   77\n",
       "H      66   16\n",
       "I      20   12\n",
       "J      64   19\n",
       "K      22   39"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[['Python','En']] # 获取多列数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 标签选择"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    98\n",
       "Math      12\n",
       "En        15\n",
       "Name: A, dtype: int64"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 标签，就是行索引 location = loc 位置\n",
    "df.loc['A']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>98</td>\n",
       "      <td>12</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>22</td>\n",
       "      <td>126</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "A      98    12  15\n",
       "F     138   116  77\n",
       "K      22   126  39"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[['A','F','K']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "98"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc['A','Python']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A     98\n",
       "C    122\n",
       "F    138\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[['A','C','F'],'Python']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>12</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>62</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>16</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>136</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>87</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Math  En\n",
       "A    12  15\n",
       "C    62  17\n",
       "E    16  91\n",
       "H   136  16\n",
       "J    87  19"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc['A'::2,['Math','En']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>98</td>\n",
       "      <td>12</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>62</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>85</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      98    12   15\n",
       "B     104    73  120\n",
       "C     122    62   17\n",
       "D      71    85   80"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc['A':'D',:]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 位置选择"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    98\n",
       "Math      12\n",
       "En        15\n",
       "Name: A, dtype: int64"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>98</td>\n",
       "      <td>12</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>62</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>16</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "A      98    12  15\n",
       "C     122    62  17\n",
       "E      99    16  91"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[[0,2,4]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>98</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python   En\n",
       "A      98   15\n",
       "B     104  120\n",
       "C     122   17\n",
       "D      71   80"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[0:4,[0,2]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>85</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>20</td>\n",
       "      <td>122</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "D      71    85  80\n",
       "F     138   116  77\n",
       "I      20   122  12"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[3:8:2]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### boolean索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>98</td>\n",
       "      <td>12</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>62</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>16</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      98    12   15\n",
       "B     104    73  120\n",
       "C     122    62   17\n",
       "E      99    16   91\n",
       "F     138   116   77"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = df.Python > 80 # 将Python大于80分的成绩获取\n",
    "df[cond]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>85</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "B     104    73  120\n",
       "D      71    85   80\n",
       "F     138   116   77"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = df.mean(axis = 1) > 75 # 平均分大于75，优秀，筛选出来\n",
    "df[cond]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>85</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "B     104    73  120\n",
       "D      71    85   80\n",
       "F     138   116   77"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = (df.Python > 70) & (df.Math > 70)\n",
    "df[cond]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>62</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>16</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>66</td>\n",
       "      <td>136</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>22</td>\n",
       "      <td>126</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "C     122    62  17\n",
       "E      99    16  91\n",
       "H      66   136  16\n",
       "K      22   126  39"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = df.index.isin(['C','E','H','K']) # 判断数据是否在数组中\n",
    "df[cond] # 删选出来了符合条件的数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 赋值操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>12</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>62</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>85</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>16</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>66</td>\n",
       "      <td>136</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>20</td>\n",
       "      <td>122</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>64</td>\n",
       "      <td>87</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>22</td>\n",
       "      <td>126</td>\n",
       "      <td>39</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A     150    12   15\n",
       "B     104    73  120\n",
       "C     122    62   17\n",
       "D      71    85   80\n",
       "E      99    16   91\n",
       "F     138   116   77\n",
       "H      66   136   16\n",
       "I      20   122   12\n",
       "J      64    87   19\n",
       "K      22   126   39"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python']['A'] = 150 # 修改某个位置的值\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>12</td>\n",
       "      <td>15</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>62</td>\n",
       "      <td>17</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>85</td>\n",
       "      <td>80</td>\n",
       "      <td>146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>16</td>\n",
       "      <td>91</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>66</td>\n",
       "      <td>136</td>\n",
       "      <td>16</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>20</td>\n",
       "      <td>122</td>\n",
       "      <td>12</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>64</td>\n",
       "      <td>87</td>\n",
       "      <td>19</td>\n",
       "      <td>123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>22</td>\n",
       "      <td>126</td>\n",
       "      <td>39</td>\n",
       "      <td>126</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java\n",
       "A     150    12   15    69\n",
       "B     104    73  120    41\n",
       "C     122    62   17   108\n",
       "D      71    85   80   146\n",
       "E      99    16   91    40\n",
       "F     138   116   77    25\n",
       "H      66   136   16    57\n",
       "I      20   122   12    72\n",
       "J      64    87   19   123\n",
       "K      22   126   39   126"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Java'] = np.random.randint(0,151,size = 10) # 新增加一列\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>12</td>\n",
       "      <td>15</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>147</td>\n",
       "      <td>17</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>147</td>\n",
       "      <td>80</td>\n",
       "      <td>146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>147</td>\n",
       "      <td>91</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>66</td>\n",
       "      <td>136</td>\n",
       "      <td>16</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>20</td>\n",
       "      <td>122</td>\n",
       "      <td>12</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>64</td>\n",
       "      <td>87</td>\n",
       "      <td>19</td>\n",
       "      <td>123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>22</td>\n",
       "      <td>126</td>\n",
       "      <td>39</td>\n",
       "      <td>126</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java\n",
       "A     150    12   15    69\n",
       "B     104    73  120    41\n",
       "C     122   147   17   108\n",
       "D      71   147   80   146\n",
       "E      99   147   91    40\n",
       "F     138   116   77    25\n",
       "H      66   136   16    57\n",
       "I      20   122   12    72\n",
       "J      64    87   19   123\n",
       "K      22   126   39   126"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[['C','D','E'],'Math'] = 147 # 修改多个人的成绩\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "cond = df < 60\n",
    "df[cond] = 60 # where 条件操作，符合这条件值，修改，不符合，不改变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>60</td>\n",
       "      <td>60</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>147</td>\n",
       "      <td>60</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>71</td>\n",
       "      <td>147</td>\n",
       "      <td>80</td>\n",
       "      <td>146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>147</td>\n",
       "      <td>91</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>66</td>\n",
       "      <td>136</td>\n",
       "      <td>60</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>60</td>\n",
       "      <td>122</td>\n",
       "      <td>60</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>64</td>\n",
       "      <td>87</td>\n",
       "      <td>60</td>\n",
       "      <td>123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>60</td>\n",
       "      <td>126</td>\n",
       "      <td>60</td>\n",
       "      <td>126</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java\n",
       "A     150    60   60    69\n",
       "B     104    73  120    60\n",
       "C     122   147   60   108\n",
       "D      71   147   80   146\n",
       "E      99   147   91    60\n",
       "F     138   116   77    60\n",
       "H      66   136   60    60\n",
       "I      60   122   60    72\n",
       "J      64    87   60   123\n",
       "K      60   126   60   126"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.iloc[3::3,[0,2]] += 100"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>150</td>\n",
       "      <td>60</td>\n",
       "      <td>60</td>\n",
       "      <td>69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>104</td>\n",
       "      <td>73</td>\n",
       "      <td>120</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>122</td>\n",
       "      <td>147</td>\n",
       "      <td>60</td>\n",
       "      <td>108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>171</td>\n",
       "      <td>147</td>\n",
       "      <td>180</td>\n",
       "      <td>146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>99</td>\n",
       "      <td>147</td>\n",
       "      <td>91</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>138</td>\n",
       "      <td>116</td>\n",
       "      <td>77</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>166</td>\n",
       "      <td>136</td>\n",
       "      <td>160</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>60</td>\n",
       "      <td>122</td>\n",
       "      <td>60</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>64</td>\n",
       "      <td>87</td>\n",
       "      <td>60</td>\n",
       "      <td>123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>160</td>\n",
       "      <td>126</td>\n",
       "      <td>160</td>\n",
       "      <td>126</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java\n",
       "A     150    60   60    69\n",
       "B     104    73  120    60\n",
       "C     122   147   60   108\n",
       "D     171   147  180   146\n",
       "E      99   147   91    60\n",
       "F     138   116   77    60\n",
       "H     166   136  160    60\n",
       "I      60   122   60    72\n",
       "J      64    87   60   123\n",
       "K     160   126  160   126"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据集成"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### concat数据串联"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "# np.concatenate NumPy数据集成\n",
    "df1 = pd.DataFrame(np.random.randint(0,151,size = (10,3)),\n",
    "                   columns=['Python','Math','En'],\n",
    "                   index = list('ABCDEFHIJK'))\n",
    "df2 = pd.DataFrame(np.random.randint(0,151,size = (10,3)),\n",
    "                   columns = ['Python','Math','En'],\n",
    "                   index = list('QWRTUYOPLM'))\n",
    "df3 = pd.DataFrame(np.random.randint(0,151,size = (10,2)),\n",
    "                  columns=['Java','Chinese'],index = list('ABCDEFHIJK'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>61</td>\n",
       "      <td>147</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>101</td>\n",
       "      <td>140</td>\n",
       "      <td>137</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>120</td>\n",
       "      <td>146</td>\n",
       "      <td>131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>84</td>\n",
       "      <td>87</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>120</td>\n",
       "      <td>76</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>117</td>\n",
       "      <td>54</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>71</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>122</td>\n",
       "      <td>135</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>43</td>\n",
       "      <td>54</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>141</td>\n",
       "      <td>150</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>40</td>\n",
       "      <td>9</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>9</td>\n",
       "      <td>98</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>90</td>\n",
       "      <td>44</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>127</td>\n",
       "      <td>82</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>8</td>\n",
       "      <td>43</td>\n",
       "      <td>98</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>99</td>\n",
       "      <td>38</td>\n",
       "      <td>126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>50</td>\n",
       "      <td>128</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>112</td>\n",
       "      <td>1</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>28</td>\n",
       "      <td>76</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M</th>\n",
       "      <td>130</td>\n",
       "      <td>41</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      61   147  133\n",
       "B     101   140  137\n",
       "C     120   146  131\n",
       "D      84    87   83\n",
       "E     120    76   68\n",
       "F     117    54  100\n",
       "H      65    71   72\n",
       "I     122   135   64\n",
       "J      43    54   38\n",
       "K     141   150   23\n",
       "Q      40     9   54\n",
       "W       9    98   12\n",
       "R      90    44   88\n",
       "T     127    82   62\n",
       "U       8    43   98\n",
       "Y      99    38  126\n",
       "O      50   128   53\n",
       "P     112     1   41\n",
       "L      28    76   45\n",
       "M     130    41   12"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat([df1,df2],axis = 0) # axis = 0变是行合并，行增加"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "      <th>Chinese</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>61</td>\n",
       "      <td>147</td>\n",
       "      <td>133</td>\n",
       "      <td>44</td>\n",
       "      <td>109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>101</td>\n",
       "      <td>140</td>\n",
       "      <td>137</td>\n",
       "      <td>5</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>120</td>\n",
       "      <td>146</td>\n",
       "      <td>131</td>\n",
       "      <td>96</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>84</td>\n",
       "      <td>87</td>\n",
       "      <td>83</td>\n",
       "      <td>115</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>120</td>\n",
       "      <td>76</td>\n",
       "      <td>68</td>\n",
       "      <td>52</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>117</td>\n",
       "      <td>54</td>\n",
       "      <td>100</td>\n",
       "      <td>47</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>71</td>\n",
       "      <td>72</td>\n",
       "      <td>147</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>122</td>\n",
       "      <td>135</td>\n",
       "      <td>64</td>\n",
       "      <td>47</td>\n",
       "      <td>94</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>43</td>\n",
       "      <td>54</td>\n",
       "      <td>38</td>\n",
       "      <td>25</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>141</td>\n",
       "      <td>150</td>\n",
       "      <td>23</td>\n",
       "      <td>28</td>\n",
       "      <td>129</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En  Java  Chinese\n",
       "A      61   147  133    44      109\n",
       "B     101   140  137     5       26\n",
       "C     120   146  131    96       70\n",
       "D      84    87   83   115      133\n",
       "E     120    76   68    52       47\n",
       "F     117    54  100    47       38\n",
       "H      65    71   72   147       63\n",
       "I     122   135   64    47       94\n",
       "J      43    54   38    25       71\n",
       "K     141   150   23    28      129"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat([df1,df3],axis = 1) # axis = 1表示列增加"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>61</td>\n",
       "      <td>147</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>101</td>\n",
       "      <td>140</td>\n",
       "      <td>137</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>120</td>\n",
       "      <td>146</td>\n",
       "      <td>131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>84</td>\n",
       "      <td>87</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>120</td>\n",
       "      <td>76</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>117</td>\n",
       "      <td>54</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>71</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>122</td>\n",
       "      <td>135</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>43</td>\n",
       "      <td>54</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>141</td>\n",
       "      <td>150</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>40</td>\n",
       "      <td>9</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>9</td>\n",
       "      <td>98</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>90</td>\n",
       "      <td>44</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>127</td>\n",
       "      <td>82</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>8</td>\n",
       "      <td>43</td>\n",
       "      <td>98</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>99</td>\n",
       "      <td>38</td>\n",
       "      <td>126</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>50</td>\n",
       "      <td>128</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>112</td>\n",
       "      <td>1</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>28</td>\n",
       "      <td>76</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M</th>\n",
       "      <td>130</td>\n",
       "      <td>41</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      61   147  133\n",
       "B     101   140  137\n",
       "C     120   146  131\n",
       "D      84    87   83\n",
       "E     120    76   68\n",
       "F     117    54  100\n",
       "H      65    71   72\n",
       "I     122   135   64\n",
       "J      43    54   38\n",
       "K     141   150   23\n",
       "Q      40     9   54\n",
       "W       9    98   12\n",
       "R      90    44   88\n",
       "T     127    82   62\n",
       "U       8    43   98\n",
       "Y      99    38  126\n",
       "O      50   128   53\n",
       "P     112     1   41\n",
       "L      28    76   45\n",
       "M     130    41   12"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.append(df2) # append追加，在行后面直接进行追加"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "      <th>Chinese</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>61.0</td>\n",
       "      <td>147.0</td>\n",
       "      <td>133.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>101.0</td>\n",
       "      <td>140.0</td>\n",
       "      <td>137.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>120.0</td>\n",
       "      <td>146.0</td>\n",
       "      <td>131.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>84.0</td>\n",
       "      <td>87.0</td>\n",
       "      <td>83.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>120.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>117.0</td>\n",
       "      <td>54.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65.0</td>\n",
       "      <td>71.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>122.0</td>\n",
       "      <td>135.0</td>\n",
       "      <td>64.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>43.0</td>\n",
       "      <td>54.0</td>\n",
       "      <td>38.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>141.0</td>\n",
       "      <td>150.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>44.0</td>\n",
       "      <td>109.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.0</td>\n",
       "      <td>26.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>96.0</td>\n",
       "      <td>70.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>115.0</td>\n",
       "      <td>133.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>52.0</td>\n",
       "      <td>47.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>47.0</td>\n",
       "      <td>38.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>147.0</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>47.0</td>\n",
       "      <td>94.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>25.0</td>\n",
       "      <td>71.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>28.0</td>\n",
       "      <td>129.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python   Math     En   Java  Chinese\n",
       "A    61.0  147.0  133.0    NaN      NaN\n",
       "B   101.0  140.0  137.0    NaN      NaN\n",
       "C   120.0  146.0  131.0    NaN      NaN\n",
       "D    84.0   87.0   83.0    NaN      NaN\n",
       "E   120.0   76.0   68.0    NaN      NaN\n",
       "F   117.0   54.0  100.0    NaN      NaN\n",
       "H    65.0   71.0   72.0    NaN      NaN\n",
       "I   122.0  135.0   64.0    NaN      NaN\n",
       "J    43.0   54.0   38.0    NaN      NaN\n",
       "K   141.0  150.0   23.0    NaN      NaN\n",
       "A     NaN    NaN    NaN   44.0    109.0\n",
       "B     NaN    NaN    NaN    5.0     26.0\n",
       "C     NaN    NaN    NaN   96.0     70.0\n",
       "D     NaN    NaN    NaN  115.0    133.0\n",
       "E     NaN    NaN    NaN   52.0     47.0\n",
       "F     NaN    NaN    NaN   47.0     38.0\n",
       "H     NaN    NaN    NaN  147.0     63.0\n",
       "I     NaN    NaN    NaN   47.0     94.0\n",
       "J     NaN    NaN    NaN   25.0     71.0\n",
       "K     NaN    NaN    NaN   28.0    129.0"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.append(df3) # 出现空数据，原因在于：df1的列索引和df3列索引不一致"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>Java</th>\n",
       "      <th>Chinese</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>61.0</td>\n",
       "      <td>147.0</td>\n",
       "      <td>133.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>101.0</td>\n",
       "      <td>140.0</td>\n",
       "      <td>137.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>120.0</td>\n",
       "      <td>146.0</td>\n",
       "      <td>131.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>84.0</td>\n",
       "      <td>87.0</td>\n",
       "      <td>83.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>120.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>117.0</td>\n",
       "      <td>54.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65.0</td>\n",
       "      <td>71.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>122.0</td>\n",
       "      <td>135.0</td>\n",
       "      <td>64.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>43.0</td>\n",
       "      <td>54.0</td>\n",
       "      <td>38.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>141.0</td>\n",
       "      <td>150.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>44.0</td>\n",
       "      <td>109.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.0</td>\n",
       "      <td>26.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>96.0</td>\n",
       "      <td>70.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>115.0</td>\n",
       "      <td>133.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>52.0</td>\n",
       "      <td>47.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>47.0</td>\n",
       "      <td>38.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>147.0</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>47.0</td>\n",
       "      <td>94.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>25.0</td>\n",
       "      <td>71.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>28.0</td>\n",
       "      <td>129.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python   Math     En   Java  Chinese\n",
       "A    61.0  147.0  133.0    NaN      NaN\n",
       "B   101.0  140.0  137.0    NaN      NaN\n",
       "C   120.0  146.0  131.0    NaN      NaN\n",
       "D    84.0   87.0   83.0    NaN      NaN\n",
       "E   120.0   76.0   68.0    NaN      NaN\n",
       "F   117.0   54.0  100.0    NaN      NaN\n",
       "H    65.0   71.0   72.0    NaN      NaN\n",
       "I   122.0  135.0   64.0    NaN      NaN\n",
       "J    43.0   54.0   38.0    NaN      NaN\n",
       "K   141.0  150.0   23.0    NaN      NaN\n",
       "A     NaN    NaN    NaN   44.0    109.0\n",
       "B     NaN    NaN    NaN    5.0     26.0\n",
       "C     NaN    NaN    NaN   96.0     70.0\n",
       "D     NaN    NaN    NaN  115.0    133.0\n",
       "E     NaN    NaN    NaN   52.0     47.0\n",
       "F     NaN    NaN    NaN   47.0     38.0\n",
       "H     NaN    NaN    NaN  147.0     63.0\n",
       "I     NaN    NaN    NaN   47.0     94.0\n",
       "J     NaN    NaN    NaN   25.0     71.0\n",
       "K     NaN    NaN    NaN   28.0    129.0"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat([df1,df3],axis = 0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 数据插入"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>61</td>\n",
       "      <td>147</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>101</td>\n",
       "      <td>140</td>\n",
       "      <td>137</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>120</td>\n",
       "      <td>146</td>\n",
       "      <td>131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>84</td>\n",
       "      <td>87</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>120</td>\n",
       "      <td>76</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>117</td>\n",
       "      <td>54</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>71</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>122</td>\n",
       "      <td>135</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>43</td>\n",
       "      <td>54</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>141</td>\n",
       "      <td>150</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      61   147  133\n",
       "B     101   140  137\n",
       "C     120   146  131\n",
       "D      84    87   83\n",
       "E     120    76   68\n",
       "F     117    54  100\n",
       "H      65    71   72\n",
       "I     122   135   64\n",
       "J      43    54   38\n",
       "K     141   150   23"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df1.insert(loc = 1, # 插入位置\n",
    "           column='C++', # 插入一列，这一列名字\n",
    "           value = np.random.randint(0,151,size = 10)) # 插入的值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>C++</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>61</td>\n",
       "      <td>3</td>\n",
       "      <td>147</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>101</td>\n",
       "      <td>3</td>\n",
       "      <td>140</td>\n",
       "      <td>137</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>120</td>\n",
       "      <td>133</td>\n",
       "      <td>146</td>\n",
       "      <td>131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>84</td>\n",
       "      <td>29</td>\n",
       "      <td>87</td>\n",
       "      <td>83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>120</td>\n",
       "      <td>138</td>\n",
       "      <td>76</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>117</td>\n",
       "      <td>144</td>\n",
       "      <td>54</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>64</td>\n",
       "      <td>71</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>122</td>\n",
       "      <td>34</td>\n",
       "      <td>135</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>43</td>\n",
       "      <td>2</td>\n",
       "      <td>54</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>141</td>\n",
       "      <td>106</td>\n",
       "      <td>150</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  C++  Math   En\n",
       "A      61    3   147  133\n",
       "B     101    3   140  137\n",
       "C     120  133   146  131\n",
       "D      84   29    87   83\n",
       "E     120  138    76   68\n",
       "F     117  144    54  100\n",
       "H      65   64    71   72\n",
       "I     122   34   135   64\n",
       "J      43    2    54   38\n",
       "K     141  106   150   23"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### Join SQL风格合并"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height\n",
       "0   softpo     175\n",
       "1  Brandon     180\n",
       "2     Ella     169\n",
       "3   Daniel     177\n",
       "4       张三     168"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>李四</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  weight\n",
       "0   softpo      70\n",
       "1  Brandon      65\n",
       "2     Ella      74\n",
       "3   Daniel      63\n",
       "4       李四      88"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>名字</th>\n",
       "      <th>salary</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>73</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        名字  salary\n",
       "0   softpo      71\n",
       "1  Brandon      90\n",
       "2     Ella      68\n",
       "3   Daniel      88\n",
       "4       张三      73"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df1 = pd.DataFrame(data = {'name':['softpo','Brandon','Ella','Daniel','张三'],\n",
    "                           'height':[175,180,169,177,168]}) # 身高\n",
    "df2 = pd.DataFrame(data = {'name':['softpo','Brandon','Ella','Daniel','李四'],\n",
    "                           'weight':[70,65,74,63,88]}) # 体重\n",
    "df3 = pd.DataFrame(data = {'名字':['softpo','Brandon','Ella','Daniel','张三'],\n",
    "                           'salary':np.random.randint(20,100,size = 5)}) # 薪水\n",
    "display(df1,df2,df3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>name</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "      <td>softpo</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "      <td>Brandon</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "      <td>Ella</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "      <td>Daniel</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168</td>\n",
       "      <td>李四</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height     name  weight\n",
       "0   softpo     175   softpo      70\n",
       "1  Brandon     180  Brandon      65\n",
       "2     Ella     169     Ella      74\n",
       "3   Daniel     177   Daniel      63\n",
       "4       张三     168       李四      88"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat([df1,df2],axis = 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height  weight\n",
       "0   softpo     175      70\n",
       "1  Brandon     180      65\n",
       "2     Ella     169      74\n",
       "3   Daniel     177      63"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 根据共同的属性，合并数据\n",
    "# df1 和 df2 共同属性：name\n",
    "# 数据库，合并join 共同key\n",
    "# inner内合并\n",
    "pd.merge(df1,df2,how = 'inner') # 根据共同name进行合并，两表合并，外键"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175.0</td>\n",
       "      <td>70.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180.0</td>\n",
       "      <td>65.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169.0</td>\n",
       "      <td>74.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177.0</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>李四</td>\n",
       "      <td>NaN</td>\n",
       "      <td>88.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height  weight\n",
       "0   softpo   175.0    70.0\n",
       "1  Brandon   180.0    65.0\n",
       "2     Ella   169.0    74.0\n",
       "3   Daniel   177.0    63.0\n",
       "4       张三   168.0     NaN\n",
       "5       李四     NaN    88.0"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(df1,df2,how = 'outer') # 外合并，所有数据保留，不对应位置，填充了空数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "      <td>70.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "      <td>65.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "      <td>74.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "      <td>63.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height  weight\n",
       "0   softpo     175    70.0\n",
       "1  Brandon     180    65.0\n",
       "2     Ella     169    74.0\n",
       "3   Daniel     177    63.0\n",
       "4       张三     168     NaN"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(df1,df2,how = 'left')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>height</th>\n",
       "      <th>名字</th>\n",
       "      <th>salary</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>softpo</td>\n",
       "      <td>175</td>\n",
       "      <td>softpo</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Brandon</td>\n",
       "      <td>180</td>\n",
       "      <td>Brandon</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ella</td>\n",
       "      <td>169</td>\n",
       "      <td>Ella</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Daniel</td>\n",
       "      <td>177</td>\n",
       "      <td>Daniel</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>张三</td>\n",
       "      <td>168</td>\n",
       "      <td>张三</td>\n",
       "      <td>73</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      name  height       名字  salary\n",
       "0   softpo     175   softpo      71\n",
       "1  Brandon     180  Brandon      90\n",
       "2     Ella     169     Ella      68\n",
       "3   Daniel     177   Daniel      88\n",
       "4       张三     168       张三      73"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(df1,df3,left_on='name',right_on='名字')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>87</td>\n",
       "      <td>20</td>\n",
       "      <td>127</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>47</td>\n",
       "      <td>149</td>\n",
       "      <td>103</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>77</td>\n",
       "      <td>116</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>47</td>\n",
       "      <td>67</td>\n",
       "      <td>49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>98</td>\n",
       "      <td>41</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>34</td>\n",
       "      <td>22</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>41</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>66</td>\n",
       "      <td>87</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>112</td>\n",
       "      <td>47</td>\n",
       "      <td>134</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>6</td>\n",
       "      <td>115</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      87    20  127\n",
       "B      47   149  103\n",
       "C      77   116    0\n",
       "D      47    67   49\n",
       "E      98    41  142\n",
       "F      34    22  128\n",
       "H      65    41   12\n",
       "I      66    87   81\n",
       "J     112    47  134\n",
       "K       6   115   11"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df4 = pd.DataFrame(data = np.random.randint(0,151,size = (10,3)),\n",
    "                   columns=['Python','Math','En'],index = list('ABCDEFHIJK'))\n",
    "df4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A    78.0\n",
       "B    99.7\n",
       "C    64.3\n",
       "D    54.3\n",
       "E    93.7\n",
       "F    61.3\n",
       "H    39.3\n",
       "I    78.0\n",
       "J    97.7\n",
       "K    44.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score_mean = df4.mean(axis = 1).round(1)\n",
    "score_mean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df4.insert(loc = 2,column='平均分',value=score_mean)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>平均分</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>87</td>\n",
       "      <td>20</td>\n",
       "      <td>78.0</td>\n",
       "      <td>127</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>47</td>\n",
       "      <td>149</td>\n",
       "      <td>99.7</td>\n",
       "      <td>103</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>77</td>\n",
       "      <td>116</td>\n",
       "      <td>64.3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>47</td>\n",
       "      <td>67</td>\n",
       "      <td>54.3</td>\n",
       "      <td>49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>98</td>\n",
       "      <td>41</td>\n",
       "      <td>93.7</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>34</td>\n",
       "      <td>22</td>\n",
       "      <td>61.3</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>41</td>\n",
       "      <td>39.3</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>66</td>\n",
       "      <td>87</td>\n",
       "      <td>78.0</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>112</td>\n",
       "      <td>47</td>\n",
       "      <td>97.7</td>\n",
       "      <td>134</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>6</td>\n",
       "      <td>115</td>\n",
       "      <td>44.0</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   平均分   En\n",
       "A      87    20  78.0  127\n",
       "B      47   149  99.7  103\n",
       "C      77   116  64.3    0\n",
       "D      47    67  54.3   49\n",
       "E      98    41  93.7  142\n",
       "F      34    22  61.3  128\n",
       "H      65    41  39.3   12\n",
       "I      66    87  78.0   81\n",
       "J     112    47  97.7  134\n",
       "K       6   115  44.0   11"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>87</td>\n",
       "      <td>20</td>\n",
       "      <td>127</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>47</td>\n",
       "      <td>149</td>\n",
       "      <td>103</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>77</td>\n",
       "      <td>116</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>47</td>\n",
       "      <td>67</td>\n",
       "      <td>49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>98</td>\n",
       "      <td>41</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>34</td>\n",
       "      <td>22</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>41</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>66</td>\n",
       "      <td>87</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>112</td>\n",
       "      <td>47</td>\n",
       "      <td>134</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>6</td>\n",
       "      <td>115</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      87    20  127\n",
       "B      47   149  103\n",
       "C      77   116    0\n",
       "D      47    67   49\n",
       "E      98    41  142\n",
       "F      34    22  128\n",
       "H      65    41   12\n",
       "I      66    87   81\n",
       "J     112    47  134\n",
       "K       6   115   11"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df5 = df4.iloc[:,[0,1,3]]\n",
    "df5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A    78.0\n",
       "B    99.7\n",
       "C    64.3\n",
       "D    54.3\n",
       "E    93.7\n",
       "F    61.3\n",
       "H    39.3\n",
       "I    78.0\n",
       "J    97.7\n",
       "K    44.0\n",
       "Name: 平均分, dtype: float64"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score_mean.name = '平均分'\n",
    "score_mean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>87</td>\n",
       "      <td>20</td>\n",
       "      <td>127</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>47</td>\n",
       "      <td>149</td>\n",
       "      <td>103</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>77</td>\n",
       "      <td>116</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>47</td>\n",
       "      <td>67</td>\n",
       "      <td>49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>98</td>\n",
       "      <td>41</td>\n",
       "      <td>142</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>34</td>\n",
       "      <td>22</td>\n",
       "      <td>128</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>41</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>66</td>\n",
       "      <td>87</td>\n",
       "      <td>81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>112</td>\n",
       "      <td>47</td>\n",
       "      <td>134</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>6</td>\n",
       "      <td>115</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A      87    20  127\n",
       "B      47   149  103\n",
       "C      77   116    0\n",
       "D      47    67   49\n",
       "E      98    41  142\n",
       "F      34    22  128\n",
       "H      65    41   12\n",
       "I      66    87   81\n",
       "J     112    47  134\n",
       "K       6   115   11"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>平均分</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>87</td>\n",
       "      <td>20</td>\n",
       "      <td>127</td>\n",
       "      <td>78.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>47</td>\n",
       "      <td>149</td>\n",
       "      <td>103</td>\n",
       "      <td>99.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>77</td>\n",
       "      <td>116</td>\n",
       "      <td>0</td>\n",
       "      <td>64.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>47</td>\n",
       "      <td>67</td>\n",
       "      <td>49</td>\n",
       "      <td>54.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>98</td>\n",
       "      <td>41</td>\n",
       "      <td>142</td>\n",
       "      <td>93.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>34</td>\n",
       "      <td>22</td>\n",
       "      <td>128</td>\n",
       "      <td>61.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>65</td>\n",
       "      <td>41</td>\n",
       "      <td>12</td>\n",
       "      <td>39.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>66</td>\n",
       "      <td>87</td>\n",
       "      <td>81</td>\n",
       "      <td>78.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>112</td>\n",
       "      <td>47</td>\n",
       "      <td>134</td>\n",
       "      <td>97.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>6</td>\n",
       "      <td>115</td>\n",
       "      <td>11</td>\n",
       "      <td>44.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En   平均分\n",
       "A      87    20  127  78.0\n",
       "B      47   149  103  99.7\n",
       "C      77   116    0  64.3\n",
       "D      47    67   49  54.3\n",
       "E      98    41  142  93.7\n",
       "F      34    22  128  61.3\n",
       "H      65    41   12  39.3\n",
       "I      66    87   81  78.0\n",
       "J     112    47  134  97.7\n",
       "K       6   115   11  44.0"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(df5,score_mean,\n",
    "         left_index=True, # 数据合并根据行索引，对应\n",
    "         right_index=True) # 右边数据根据行索引，对应"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据清洗"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "2    red     20\n",
       "3  green     18\n",
       "4  green     18\n",
       "5   blue     22\n",
       "6   None     30\n",
       "7    NaN     30\n",
       "8  green     22"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = {'color':['red','blue','red','green','green','blue',None,np.NaN,'green'],\n",
    "                          'price':[20,15,20,18,18,22,30,30,22]})\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "3  green     18\n",
       "5   blue     22\n",
       "6   None     30\n",
       "8  green     22"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 重复数据删除\n",
    "df.drop_duplicates() # 非重复数据，索引7和索引6重复数据，None和NaN一回事"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "2    red     20\n",
       "3  green     18\n",
       "4  green     18\n",
       "5   blue     22\n",
       "6   None     30\n",
       "7    NaN     30\n",
       "8  green     22"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "2    red     20\n",
       "3  green     18\n",
       "4  green     18\n",
       "5   blue     22\n",
       "8  green     22"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.dropna() # 空数据过滤"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price\n",
       "0    red     20\n",
       "1   blue     15\n",
       "3  green     18\n",
       "5   blue     22\n",
       "7    NaN     30"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 删除行，或者列\n",
    "df.drop(labels=[2,4,6,8]) # 默认情况下删除行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price\n",
       "0     20\n",
       "1     15\n",
       "2     20\n",
       "3     18\n",
       "4     18\n",
       "5     22\n",
       "6     30\n",
       "7     30\n",
       "8     22"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 删除指定的列\n",
    "df.drop(labels='color',axis = 1) # 删除列，axis = 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price\n",
       "0     20\n",
       "1     15\n",
       "2     20\n",
       "3     18\n",
       "4     18\n",
       "5     22\n",
       "6     30\n",
       "7     30\n",
       "8     22"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.filter(items=['price']) # 参数意思，保留数据price"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price  size\n",
       "0    red     20  1024\n",
       "1   blue     15  1024\n",
       "2    red     20  1024\n",
       "3  green     18  1024\n",
       "4  green     18  1024\n",
       "5   blue     22  1024\n",
       "6   None     30  1024\n",
       "7    NaN     30  1024\n",
       "8  green     22  1024"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['size'] = 1024 # 广播\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price  size\n",
       "0     20  1024\n",
       "1     15  1024\n",
       "2     20  1024\n",
       "3     18  1024\n",
       "4     18  1024\n",
       "5     22  1024\n",
       "6     30  1024\n",
       "7     30  1024\n",
       "8     22  1024"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.filter(like = 'i') # 模糊匹配，保留了带有i这个字母的索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>color</th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "      <th>hello</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>blue</td>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>red</td>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>green</td>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue</td>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>None</td>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>green</td>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   color  price  size  hello\n",
       "0    red     20  1024    512\n",
       "1   blue     15  1024    512\n",
       "2    red     20  1024    512\n",
       "3  green     18  1024    512\n",
       "4  green     18  1024    512\n",
       "5   blue     22  1024    512\n",
       "6   None     30  1024    512\n",
       "7    NaN     30  1024    512\n",
       "8  green     22  1024    512"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['hello'] = 512\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price  size\n",
       "0     20  1024\n",
       "1     15  1024\n",
       "2     20  1024\n",
       "3     18  1024\n",
       "4     18  1024\n",
       "5     22  1024\n",
       "6     30  1024\n",
       "7     30  1024\n",
       "8     22  1024"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 正则表达式，方式很多\n",
    "df.filter(regex = 'e$') # 正则表达式，正则表达式，限制e必须在最后"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>size</th>\n",
       "      <th>hello</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>15</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>18</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>30</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22</td>\n",
       "      <td>1024</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   price  size  hello\n",
       "0     20  1024    512\n",
       "1     15  1024    512\n",
       "2     20  1024    512\n",
       "3     18  1024    512\n",
       "4     18  1024    512\n",
       "5     22  1024    512\n",
       "6     30  1024    512\n",
       "7     30  1024    512\n",
       "8     22  1024    512"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.filter(regex='e') # 只要带有e全部选出来"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([665, 303,  61, 545, 295, 371, 566, 466,  42, 680, 197, 796,  71,\n",
       "       233,   4, 671, 506, 696, 433, 662, 863, 493, 918, 350, 411, 555,\n",
       "       334, 472, 236, 410, 167, 115,  75, 146,   7, 151, 523, 829, 101,\n",
       "       862, 203,  63, 134, 655, 624,  62,  15, 767, 408, 187, 953, 189,\n",
       "       928, 767, 143, 438, 272, 172, 682, 106, 848, 415, 836, 553, 147,\n",
       "       186, 448, 686, 275, 861, 503, 897, 721,  63, 565, 177, 321, 315,\n",
       "       386, 953, 522, 235, 779, 805, 500,  33, 952, 755, 600, 493, 700,\n",
       "       435,  11, 351, 310, 606, 455,  81, 189,  22, 545, 759, 536, 460,\n",
       "       476, 599, 871, 966, 513, 806, 826, 773, 105, 170,  19, 999, 245,\n",
       "       535, 984, 842, 349, 554, 457, 564, 281, 846, 849, 199, 868, 720,\n",
       "       192,  49, 834, 561, 823, 399, 596, 171, 731, 660, 735, 704, 204,\n",
       "       630, 412, 182,  14, 962, 459, 333,  34, 568, 935, 410, 109, 368,\n",
       "       422, 318, 404, 838,  27, 989, 263, 418, 574, 895, 646, 348, 627,\n",
       "       229, 159,  33, 384, 446, 868, 802, 451, 368, 283, 908, 926, 824,\n",
       "       315, 878, 522,  70, 386, 829, 986, 389, 614, 605, 353, 208, 768,\n",
       "       222, 173, 232, 978, 808])"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 异常值过滤\n",
    "a = np.random.randint(0,1000,size = 200)\n",
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([665, 303, 545, 295, 371, 566, 466, 680, 197, 796, 233, 671, 506,\n",
       "       696, 433, 662, 493, 350, 411, 555, 334, 472, 236, 410, 167, 115,\n",
       "       146, 151, 523, 101, 203, 134, 655, 624, 767, 408, 187, 189, 767,\n",
       "       143, 438, 272, 172, 682, 106, 415, 553, 147, 186, 448, 686, 275,\n",
       "       503, 721, 565, 177, 321, 315, 386, 522, 235, 779, 500, 755, 600,\n",
       "       493, 700, 435, 351, 310, 606, 455, 189, 545, 759, 536, 460, 476,\n",
       "       599, 513, 773, 105, 170, 245, 535, 349, 554, 457, 564, 281, 199,\n",
       "       720, 192, 561, 399, 596, 171, 731, 660, 735, 704, 204, 630, 412,\n",
       "       182, 459, 333, 568, 410, 109, 368, 422, 318, 404, 263, 418, 574,\n",
       "       646, 348, 627, 229, 159, 384, 446, 451, 368, 283, 315, 522, 386,\n",
       "       389, 614, 605, 353, 208, 768, 222, 173, 232])"
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 异常值，大于800，小于 100算作异常，认为定义的。根据实际情况。\n",
    "cond = (a <=800) & (a >=100)\n",
    "a[cond]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-1.25146597, -1.13468219, -0.34087478, ...,  0.04050999,\n",
       "       -1.30795001, -0.05960961])"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 正态分布，平均值是0，标准差是1\n",
    "b = np.random.randn(100000)\n",
    "b"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "$$3\\sigma$$过滤异常值 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 3.22935873, -3.07339545,  3.14762794, -3.20977481,  3.96894599,\n",
       "        3.36186908, -3.15447456,  3.80936985,  3.10916585,  3.59831965,\n",
       "       -3.41947745,  3.15986863,  4.704713  , -3.10196971,  3.35729769,\n",
       "       -3.23805633,  3.16548007, -3.86461903, -3.38145138,  3.31866251,\n",
       "        3.6996771 ,  3.456999  , -3.23239752, -3.07691008, -3.31229638,\n",
       "        3.27379616,  3.34003289, -3.11443272, -3.05496767,  3.30658225,\n",
       "        3.65744687, -3.0421461 , -3.04234641, -3.04142822, -3.17118522,\n",
       "        3.37224521,  3.85248705,  3.1801332 ,  3.16845292,  3.55787541,\n",
       "       -3.03979066,  3.2415063 , -3.82399566,  3.16453894, -3.17016493,\n",
       "       -3.08616298,  3.14349907, -3.16655093, -3.47191643,  3.23981962,\n",
       "       -3.13471178, -3.13436719, -3.13888605,  3.83018019,  3.76942136,\n",
       "        3.56470909, -3.3035028 , -3.34612501,  3.08622082,  3.00136599,\n",
       "       -3.14854682,  3.11288828, -3.25211686,  3.00397836,  3.12080297,\n",
       "        3.08933218,  3.28883013, -3.01460246, -3.15300665, -3.36803689,\n",
       "        3.08334447, -3.70866771,  3.24255685,  3.16955705,  3.12891738,\n",
       "        3.35255997, -3.12233063,  3.09056994,  3.26675911,  3.01360078,\n",
       "       -3.42570445, -3.10024797,  3.20939104,  3.30831005, -3.16589973,\n",
       "       -3.24067715, -3.08752719, -3.06566785, -3.15970448, -3.02271066,\n",
       "        3.09821607, -3.13263383,  3.44211203,  3.68212337,  3.19269436,\n",
       "        3.41683574,  3.12889624, -3.01496302,  3.43520135, -3.06130733,\n",
       "        3.29977169,  3.20694459, -3.15061984,  3.13478416,  3.2538515 ,\n",
       "       -4.16710554,  3.11319721,  3.07964808, -3.26468633, -3.84438689,\n",
       "       -3.27306204,  3.00071132, -3.06781967, -3.06420208, -3.18897784,\n",
       "        3.18143543, -3.09461906,  3.20239222, -3.98673591, -3.67119752,\n",
       "       -3.11265652,  3.30778549, -3.27862842, -3.78337325, -3.46731717,\n",
       "        3.18254663, -3.06388221, -3.01408342,  3.09586954,  3.06828036,\n",
       "       -3.12493847,  3.11086824, -3.15941497,  3.20507474,  3.07112759,\n",
       "        3.20624268, -3.13151328,  3.01403085, -3.06961827,  3.16763977,\n",
       "       -3.17888257,  3.02713408,  3.70914775,  3.28766493,  3.07574664,\n",
       "       -3.12662434,  3.31897768,  3.2255674 , -3.10382312,  3.19280069,\n",
       "       -3.29916924,  3.07040666, -3.155738  ,  3.25362174, -3.49262664,\n",
       "       -3.10250503, -3.3052601 ,  3.2089806 ,  3.31605249, -3.57225708,\n",
       "       -3.71351652, -3.04690324, -3.38262177,  3.10792482, -3.35866267,\n",
       "       -3.26817408, -3.10917358,  3.06928048,  3.04489038, -3.13898531,\n",
       "        3.00614622,  3.10861669,  3.69020353, -3.03895513,  3.48753129,\n",
       "        3.14739941, -3.13844894, -3.20723637,  3.31019065, -3.8272779 ,\n",
       "        3.07189453,  3.58610552, -4.16565551, -4.09730676, -4.41428662,\n",
       "       -3.09979743, -3.01898706,  3.68856691,  3.49006843,  4.02637984,\n",
       "       -3.3816365 ,  4.47565261, -3.13587862,  3.15641043,  3.18878864,\n",
       "       -3.07371019, -3.00045216,  3.0885886 ,  3.32539844, -3.10287375,\n",
       "        3.40444202, -3.26857864,  3.32121934,  3.09028133, -3.04457161,\n",
       "       -3.25362486, -3.32485917,  3.1071325 , -4.06366141, -3.09822355,\n",
       "       -3.1064778 , -3.39290595,  3.25691942, -3.0540007 , -3.18127194,\n",
       "       -3.21847049, -3.01905601, -3.03402121,  3.03312272, -4.22167454,\n",
       "       -3.19484805,  3.20859128,  3.45248359,  3.63468673, -3.03783247,\n",
       "        3.22453455,  3.04644269, -3.19056806,  3.29401016, -3.24338547,\n",
       "        3.50662232, -3.22123458,  3.59661268, -3.16879181, -3.2934898 ,\n",
       "        3.40725478, -3.18555184,  3.01063881,  3.14198447,  3.11043405,\n",
       "        3.76634423,  3.0241369 ,  3.03102528, -3.10610279,  3.30067429,\n",
       "       -3.18171871, -3.14165151,  3.1282659 ,  3.47837549, -3.03601819,\n",
       "       -3.47003474,  3.41595486, -3.05084312, -3.14594811, -3.45684515,\n",
       "       -3.02580197, -3.08613417,  3.21440066, -3.06895675,  3.59691053,\n",
       "        3.10016382,  3.08733027,  3.18531506,  3.39023338, -3.74865473,\n",
       "       -3.06664707, -3.27181239, -3.09611373, -3.257227  , -3.03740684,\n",
       "        3.41465538, -3.02660396,  3.59006772, -3.21154118, -3.00601399,\n",
       "       -3.44894872, -3.08720684, -3.07415999,  3.00241879,  3.26437726,\n",
       "        3.08003504, -3.08695887, -3.19981199, -3.34573232,  3.0314491 ,\n",
       "        3.16097354, -3.07773876, -3.29331563, -3.08180148,  3.0308278 ,\n",
       "        3.0766938 , -3.53375575])"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cond = np.abs(b) > 3*1 # 这些异常值，找到了\n",
    "b[cond]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据转换"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 轴和元素转换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       7           8      6\n",
       "B       8           2      1\n",
       "C       9           6      2\n",
       "D       6           6      9\n",
       "E       9           9      6\n",
       "F       3           3      3\n",
       "H       3           3      3\n",
       "I       8           4      3\n",
       "J       3           6      2\n",
       "K       6           2      2"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = np.random.randint(0,10,size = (10,3)),\n",
    "                  columns=['Python','Tensorflow','Keras'],\n",
    "                  index = list('ABCDEFHIJK'))\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.rename(index = {'A':'X','K':'Y'}, # 行索引\n",
    "          columns={'Python':'人工智能'}, # 列索引修改\n",
    "          inplace=True) # 替换原数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow  Keras\n",
       "X     7           8      6\n",
       "B     8           2      1\n",
       "C     9           6      2\n",
       "D     6           6      9\n",
       "E     9           9      6\n",
       "F     3           3      3\n",
       "H     3           3      3\n",
       "I     8           4      3\n",
       "J     3           6      2\n",
       "Y     6           2      2"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.replace(5,50,inplace=True)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>8</td>\n",
       "      <td>1024</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>1024</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow  Keras\n",
       "X  1024           8      6\n",
       "B     8        1024      1\n",
       "C     9           6   1024\n",
       "D     6           6      9\n",
       "E     9           9      6\n",
       "F     3           3      3\n",
       "H     3           3      3\n",
       "I     8           4      3\n",
       "J     3           6   1024\n",
       "Y     6        1024   1024"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.replace([2,7],1024,inplace=True)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "df.iloc[4,2] = np.NaN # 空数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>8</td>\n",
       "      <td>1024</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "      <td>1024.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>-100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1024.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>1024.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras\n",
       "X  1024           8     6.0\n",
       "B     8        1024     1.0\n",
       "C     9           6  1024.0\n",
       "D     6           6     9.0\n",
       "E     9           9  -100.0\n",
       "F     3           3     3.0\n",
       "H     3           3     3.0\n",
       "I     8           4     3.0\n",
       "J     3           6  1024.0\n",
       "Y     6        1024  1024.0"
      ]
     },
     "execution_count": 100,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.replace({0:2048,np.nan:-100},inplace=True)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>8</td>\n",
       "      <td>-1024</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "      <td>1024.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>-100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1024.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>-1024</td>\n",
       "      <td>1024.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras\n",
       "X  1024           8     6.0\n",
       "B     8       -1024     1.0\n",
       "C     9           6  1024.0\n",
       "D     6           6     9.0\n",
       "E     9           9  -100.0\n",
       "F     3           3     3.0\n",
       "H     3           3     3.0\n",
       "I     8           4     3.0\n",
       "J     3           6  1024.0\n",
       "Y     6       -1024  1024.0"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.replace({'Tensorflow':1024},-1024) # 指定某一列，进行数据替换"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### map映射元素转变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X       3.14\n",
       "B        NaN\n",
       "C        NaN\n",
       "D    1108.00\n",
       "E        NaN\n",
       "F        NaN\n",
       "H        NaN\n",
       "I        NaN\n",
       "J        NaN\n",
       "Y    1108.00\n",
       "Name: 人工智能, dtype: float64"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# map 只能针对一列，就是Series\n",
    "# 有一些没有对应，那么返回就是空数据\n",
    "df['人工智能'].map({1024:3.14,2048:2.718,6:1108}) # 跟据字典对数据进行改变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X     True\n",
       "B     True\n",
       "C     True\n",
       "D     True\n",
       "E    False\n",
       "F     True\n",
       "H     True\n",
       "I     True\n",
       "J     True\n",
       "Y     True\n",
       "Name: Keras, dtype: bool"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Keras'].map(lambda x :True if x > 0 else False) # 如果大于 0 返回True，不然返回False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "      <th>level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>8</td>\n",
       "      <td>1024</td>\n",
       "      <td>1.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>9.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>-100.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras  level\n",
       "X  1024           8     6.0  False\n",
       "B     8        1024     1.0   True\n",
       "C     9           6  1024.0  False\n",
       "D     6           6     9.0  False\n",
       "E     9           9  -100.0  False\n",
       "F     3           3     3.0  False\n",
       "H     3           3     3.0  False\n",
       "I     8           4     3.0  False\n",
       "J     3           6  1024.0  False\n",
       "Y     6        1024  1024.0   True"
      ]
     },
     "execution_count": 104,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def convert(x):\n",
    "    if x >= 1024:\n",
    "        return True\n",
    "    else:\n",
    "        return False\n",
    "df['level'] = df['Tensorflow'].map(convert) # map映射，映射是Tensorflow中这一列中每一个数据，传递到方法中\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### apply映射元素转变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X    1124\n",
       "B     108\n",
       "C     109\n",
       "D     106\n",
       "E     109\n",
       "F     103\n",
       "H     103\n",
       "I     108\n",
       "J     103\n",
       "Y     106\n",
       "Name: 人工智能, dtype: int64"
      ]
     },
     "execution_count": 105,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 既可以操作Series又可以操作DataFrame\n",
    "df['人工智能'].apply(lambda x : x + 100)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X    0\n",
       "B    1\n",
       "C    0\n",
       "D    0\n",
       "E    0\n",
       "F    0\n",
       "H    0\n",
       "I    0\n",
       "J    0\n",
       "Y    1\n",
       "Name: level, dtype: int64"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['level'].apply(lambda x:1 if x else 0)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "      <th>level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>2024</td>\n",
       "      <td>1008</td>\n",
       "      <td>1006.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>1008</td>\n",
       "      <td>2024</td>\n",
       "      <td>1001.0</td>\n",
       "      <td>1001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>1009</td>\n",
       "      <td>1006</td>\n",
       "      <td>2024.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>1006</td>\n",
       "      <td>1006</td>\n",
       "      <td>1009.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1009</td>\n",
       "      <td>1009</td>\n",
       "      <td>900.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>1003</td>\n",
       "      <td>1003</td>\n",
       "      <td>1003.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>1003</td>\n",
       "      <td>1003</td>\n",
       "      <td>1003.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1008</td>\n",
       "      <td>1004</td>\n",
       "      <td>1003.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1003</td>\n",
       "      <td>1006</td>\n",
       "      <td>2024.0</td>\n",
       "      <td>1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>1006</td>\n",
       "      <td>2024</td>\n",
       "      <td>2024.0</td>\n",
       "      <td>1001</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras  level\n",
       "X  2024        1008  1006.0   1000\n",
       "B  1008        2024  1001.0   1001\n",
       "C  1009        1006  2024.0   1000\n",
       "D  1006        1006  1009.0   1000\n",
       "E  1009        1009   900.0   1000\n",
       "F  1003        1003  1003.0   1000\n",
       "H  1003        1003  1003.0   1000\n",
       "I  1008        1004  1003.0   1000\n",
       "J  1003        1006  2024.0   1000\n",
       "Y  1006        2024  2024.0   1001"
      ]
     },
     "execution_count": 107,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.apply(lambda x : x + 1000) # apply对 所有的数据进行映射"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "      <th>level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>4.5</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>10.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>-100.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1024.0</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>321.9</td>\n",
       "      <td>429.4</td>\n",
       "      <td>500.9</td>\n",
       "      <td>0.421637</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     人工智能  Tensorflow   Keras     level\n",
       "0     7.0         6.0     4.5         0\n",
       "1    10.0        10.0    10.0        10\n",
       "2     3.0         3.0  -100.0     False\n",
       "3  1024.0      1024.0  1024.0      True\n",
       "4   321.9       429.4   500.9  0.421637"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def convert(x):\n",
    "    return (x.median(),x.count(),x.min(),x.max(),x.std()) # 返回中位数，返回的是计数\n",
    "df.apply(convert).round(1) # 默认操作列数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>人工智能</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "      <th>level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X</th>\n",
       "      <td>1024</td>\n",
       "      <td>8</td>\n",
       "      <td>6.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>8</td>\n",
       "      <td>1024</td>\n",
       "      <td>1.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>9.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>-100.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>3.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>6</td>\n",
       "      <td>1024</td>\n",
       "      <td>1024.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   人工智能  Tensorflow   Keras  level\n",
       "X  1024           8     6.0  False\n",
       "B     8        1024     1.0   True\n",
       "C     9           6  1024.0  False\n",
       "D     6           6     9.0  False\n",
       "E     9           9  -100.0  False\n",
       "F     3           3     3.0  False\n",
       "H     3           3     3.0  False\n",
       "I     8           4     3.0  False\n",
       "J     3           6  1024.0  False\n",
       "Y     6        1024  1024.0   True"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "X       (7.0, 4, False, 1024, 509.6780029260304)\n",
       "B         (4.5, 4, 1.0, 1024, 510.3440016302729)\n",
       "C       (7.5, 4, False, 1024.0, 509.51373877453)\n",
       "D        (6.0, 4, False, 9.0, 3.774917217635375)\n",
       "E         (4.5, 4, -100.0, 9, 53.16954015223378)\n",
       "F                        (3.0, 4, False, 3, 1.5)\n",
       "H                        (3.0, 4, False, 3, 1.5)\n",
       "I          (3.5, 4, False, 8, 3.304037933599835)\n",
       "J    (4.5, 4, False, 1024.0, 510.50587655775325)\n",
       "Y      (515.0, 4, True, 1024, 589.1894856495659)\n",
       "dtype: object"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.apply(convert,axis = 1) # axis = 1，操作数据就是行数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### transform元素转变"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       3           3      6\n",
       "B       7           9      6\n",
       "C       2           9      8\n",
       "D       5           3      7\n",
       "E       4           6      0\n",
       "F       9           8      3\n",
       "H       4           6      2\n",
       "I       6           5      7\n",
       "J       5           5      4\n",
       "K       4           4      6"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "A   -1024\n",
       "B    1024\n",
       "C   -1024\n",
       "D   -1024\n",
       "E   -1024\n",
       "F    1024\n",
       "H   -1024\n",
       "I    1024\n",
       "J   -1024\n",
       "K   -1024\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,10,size = (10,3)),\n",
    "                  columns=['Python','Tensorflow','Keras'],\n",
    "                  index = list('ABCDEFHIJK'))\n",
    "display(df)\n",
    "# 可以针对一列数据，Series进行运算\n",
    "df['Python'].transform(lambda x : 1024 if x > 5 else -1024) # 这个功能和map，apply类似的"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sqrt</th>\n",
       "      <th>square</th>\n",
       "      <th>cumsum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1.732051</td>\n",
       "      <td>9</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>81</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>81</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>1.732051</td>\n",
       "      <td>9</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>2.449490</td>\n",
       "      <td>36</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2.828427</td>\n",
       "      <td>64</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>2.449490</td>\n",
       "      <td>36</td>\n",
       "      <td>44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>2.236068</td>\n",
       "      <td>25</td>\n",
       "      <td>49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2.236068</td>\n",
       "      <td>25</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>16</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       sqrt  square  cumsum\n",
       "A  1.732051       9       3\n",
       "B  3.000000      81      12\n",
       "C  3.000000      81      21\n",
       "D  1.732051       9      24\n",
       "E  2.449490      36      30\n",
       "F  2.828427      64      38\n",
       "H  2.449490      36      44\n",
       "I  2.236068      25      49\n",
       "J  2.236068      25      54\n",
       "K  2.000000      16      58"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Tensorflow'].apply([np.sqrt,np.square,np.cumsum]) # 针对一列，进行不同的操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sqrt</th>\n",
       "      <th>square</th>\n",
       "      <th>cumsum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1.732051</td>\n",
       "      <td>9</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>81</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>81</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>1.732051</td>\n",
       "      <td>9</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>2.449490</td>\n",
       "      <td>36</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>2.828427</td>\n",
       "      <td>64</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>2.449490</td>\n",
       "      <td>36</td>\n",
       "      <td>44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>2.236068</td>\n",
       "      <td>25</td>\n",
       "      <td>49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2.236068</td>\n",
       "      <td>25</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>16</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       sqrt  square  cumsum\n",
       "A  1.732051       9       3\n",
       "B  3.000000      81      12\n",
       "C  3.000000      81      21\n",
       "D  1.732051       9      24\n",
       "E  2.449490      36      30\n",
       "F  2.828427      64      38\n",
       "H  2.449490      36      44\n",
       "I  2.236068      25      49\n",
       "J  2.236068      25      54\n",
       "K  2.000000      16      58"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Tensorflow'].transform([np.sqrt,np.square,np.cumsum]) # 针对一列，进行不同的操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>10</td>\n",
       "      <td>81</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>12</td>\n",
       "      <td>81</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>17</td>\n",
       "      <td>9</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>21</td>\n",
       "      <td>36</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>30</td>\n",
       "      <td>64</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>34</td>\n",
       "      <td>36</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>40</td>\n",
       "      <td>25</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>45</td>\n",
       "      <td>25</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>49</td>\n",
       "      <td>16</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       3           9   True\n",
       "B      10          81   True\n",
       "C      12          81   True\n",
       "D      17           9   True\n",
       "E      21          36  False\n",
       "F      30          64  False\n",
       "H      34          36  False\n",
       "I      40          25   True\n",
       "J      45          25  False\n",
       "K      49          16   True"
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def convert(x):\n",
    "    if x > 5:\n",
    "        return True\n",
    "    else:\n",
    "        return False\n",
    "# 可以针对DataFrame进行运算\n",
    "df.transform({'Python':np.cumsum,'Tensorflow':np.square,'Keras':convert}) # 对不同的列，执行不同的操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>10</td>\n",
       "      <td>81</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>12</td>\n",
       "      <td>81</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>17</td>\n",
       "      <td>9</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>21</td>\n",
       "      <td>36</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>30</td>\n",
       "      <td>64</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>34</td>\n",
       "      <td>36</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>40</td>\n",
       "      <td>25</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>45</td>\n",
       "      <td>25</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>49</td>\n",
       "      <td>16</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       3           9   True\n",
       "B      10          81   True\n",
       "C      12          81   True\n",
       "D      17           9   True\n",
       "E      21          36  False\n",
       "F      30          64  False\n",
       "H      34          36  False\n",
       "I      40          25   True\n",
       "J      45          25  False\n",
       "K      49          16   True"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.apply({'Python':np.cumsum,'Tensorflow':np.square,'Keras':convert}) # 对不同的列，执行不同的操作"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 重排随机抽样哑变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       3           3      6\n",
       "B       7           9      6\n",
       "C       2           9      8\n",
       "D       5           3      7\n",
       "E       4           6      0\n",
       "F       9           8      3\n",
       "H       4           6      2\n",
       "I       6           5      7\n",
       "J       5           5      4\n",
       "K       4           4      6"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([4, 6, 2, 9, 5, 0, 8, 1, 3, 7])"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "index = np.random.permutation(10) # 返回打乱顺讯的索引\n",
    "index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "E       4           6      0\n",
       "H       4           6      2\n",
       "C       2           9      8\n",
       "K       4           4      6\n",
       "F       9           8      3\n",
       "A       3           3      6\n",
       "J       5           5      4\n",
       "B       7           9      6\n",
       "D       5           3      7\n",
       "I       6           5      7"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 重排，索引打乱\n",
    "df.take(index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "E       4           6      0\n",
       "B       7           9      6\n",
       "B       7           9      6\n",
       "D       5           3      7\n",
       "D       5           3      7\n",
       "D       5           3      7\n",
       "D       5           3      7\n",
       "H       4           6      2\n",
       "A       3           3      6\n",
       "H       4           6      2\n",
       "I       6           5      7\n",
       "K       4           4      6\n",
       "F       9           8      3\n",
       "C       2           9      8\n",
       "I       6           5      7\n",
       "C       2           9      8\n",
       "B       7           9      6\n",
       "J       5           5      4\n",
       "C       2           9      8\n",
       "I       6           5      7"
      ]
     },
     "execution_count": 119,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 从大量数据中随机抽取数据\n",
    "df.take(np.random.randint(0,10,size = 20)) # 随机抽样20个数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>key</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>b</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>b</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>c</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>b</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>c</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  key\n",
       "0   a\n",
       "1   b\n",
       "2   a\n",
       "3   b\n",
       "4   c\n",
       "5   b\n",
       "6   c"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(data = {'key':['a','b','a','b','c','b','c']})\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>a</th>\n",
       "      <th>b</th>\n",
       "      <th>c</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   a  b  c\n",
       "0  1  0  0\n",
       "1  0  1  0\n",
       "2  1  0  0\n",
       "3  0  1  0\n",
       "4  0  0  1\n",
       "5  0  1  0\n",
       "6  0  0  1"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# one-hot,哑变量\n",
    "# str类型数据，经过哑变量变换可以使用数字表示\n",
    "pd.get_dummies(df2,prefix='',prefix_sep='') # 1表示，有；0表示，没有"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数据重塑"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7</td>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A       3           3      6\n",
       "B       7           9      6\n",
       "C       2           9      8\n",
       "D       5           3      7\n",
       "E       4           6      0\n",
       "F       9           8      3\n",
       "H       4           6      2\n",
       "I       6           5      7\n",
       "J       5           5      4\n",
       "K       4           4      6"
      ]
     },
     "execution_count": 122,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>E</th>\n",
       "      <th>F</th>\n",
       "      <th>H</th>\n",
       "      <th>I</th>\n",
       "      <th>J</th>\n",
       "      <th>K</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tensorflow</th>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Keras</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            A  B  C  D  E  F  H  I  J  K\n",
       "Python      3  7  2  5  4  9  4  6  5  4\n",
       "Tensorflow  3  9  9  3  6  8  6  5  5  4\n",
       "Keras       6  6  8  7  0  3  2  7  4  6"
      ]
     },
     "execution_count": 123,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.T # 转置，行变列，列变行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">A</th>\n",
       "      <th>期中</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">B</th>\n",
       "      <th>期中</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">C</th>\n",
       "      <th>期中</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">D</th>\n",
       "      <th>期中</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>9</td>\n",
       "      <td>6</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">E</th>\n",
       "      <th>期中</th>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">F</th>\n",
       "      <th>期中</th>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">H</th>\n",
       "      <th>期中</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">I</th>\n",
       "      <th>期中</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">J</th>\n",
       "      <th>期中</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">K</th>\n",
       "      <th>期中</th>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Python  Math  En\n",
       "A 期中       5     4   8\n",
       "  期末       9     2   4\n",
       "B 期中       8     4   1\n",
       "  期末       6     5   2\n",
       "C 期中       9     8   1\n",
       "  期末       8     8   7\n",
       "D 期中       4     3   8\n",
       "  期末       9     6   4\n",
       "E 期中       5     8   4\n",
       "  期末       1     8   9\n",
       "F 期中       7     5   5\n",
       "  期末       6     1   4\n",
       "H 期中       4     4   6\n",
       "  期末       3     6   6\n",
       "I 期中       7     7   0\n",
       "  期末       6     8   8\n",
       "J 期中       4     4   0\n",
       "  期末       0     0   9\n",
       "K 期中       2     4   4\n",
       "  期末       0     9   2"
      ]
     },
     "execution_count": 124,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(np.random.randint(0,10,size = (20,3)),\n",
    "                   columns=['Python','Math','En'],\n",
    "                   index = pd.MultiIndex.from_product([list('ABCDEFHIJK'),['期中','期末']])) # 多层索引\n",
    "\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"2\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"2\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>5</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  Python    Math    En   \n",
       "      期中 期末   期中 期末 期中 期末\n",
       "A      5  9    4  2  8  4\n",
       "B      8  6    4  5  1  2\n",
       "C      9  8    8  8  1  7\n",
       "D      4  9    3  6  8  4\n",
       "E      5  1    8  8  4  9\n",
       "F      7  6    5  1  5  4\n",
       "H      4  3    4  6  6  6\n",
       "I      7  6    7  8  0  8\n",
       "J      4  0    4  0  0  9\n",
       "K      2  0    4  9  4  2"
      ]
     },
     "execution_count": 125,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.unstack(level = 1) # 将行索引变成列索引,-1表示最后一层"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"2\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"2\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>5</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  Python    Math    En   \n",
       "      期中 期末   期中 期末 期中 期末\n",
       "A      5  9    4  2  8  4\n",
       "B      8  6    4  5  1  2\n",
       "C      9  8    8  8  1  7\n",
       "D      4  9    3  6  8  4\n",
       "E      5  1    8  8  4  9\n",
       "F      7  6    5  1  5  4\n",
       "H      4  3    4  6  6  6\n",
       "I      7  6    7  8  0  8\n",
       "J      4  0    4  0  0  9\n",
       "K      2  0    4  9  4  2"
      ]
     },
     "execution_count": 126,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.unstack(level = -1) # 将行索引变成列索引,-1表示最后一层"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A  期中  Python    5\n",
       "       Math      4\n",
       "       En        8\n",
       "   期末  Python    9\n",
       "       Math      2\n",
       "       En        4\n",
       "B  期中  Python    8\n",
       "       Math      4\n",
       "       En        1\n",
       "   期末  Python    6\n",
       "       Math      5\n",
       "       En        2\n",
       "C  期中  Python    9\n",
       "       Math      8\n",
       "       En        1\n",
       "   期末  Python    8\n",
       "       Math      8\n",
       "       En        7\n",
       "D  期中  Python    4\n",
       "       Math      3\n",
       "       En        8\n",
       "   期末  Python    9\n",
       "       Math      6\n",
       "       En        4\n",
       "E  期中  Python    5\n",
       "       Math      8\n",
       "       En        4\n",
       "   期末  Python    1\n",
       "       Math      8\n",
       "       En        9\n",
       "F  期中  Python    7\n",
       "       Math      5\n",
       "       En        5\n",
       "   期末  Python    6\n",
       "       Math      1\n",
       "       En        4\n",
       "H  期中  Python    4\n",
       "       Math      4\n",
       "       En        6\n",
       "   期末  Python    3\n",
       "       Math      6\n",
       "       En        6\n",
       "I  期中  Python    7\n",
       "       Math      7\n",
       "       En        0\n",
       "   期末  Python    6\n",
       "       Math      8\n",
       "       En        8\n",
       "J  期中  Python    4\n",
       "       Math      4\n",
       "       En        0\n",
       "   期末  Python    0\n",
       "       Math      0\n",
       "       En        9\n",
       "K  期中  Python    2\n",
       "       Math      4\n",
       "       En        4\n",
       "   期末  Python    0\n",
       "       Math      9\n",
       "       En        2\n",
       "dtype: int64"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.stack() # 列变成行了"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>期中</th>\n",
       "      <th>期末</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">A</th>\n",
       "      <th>En</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>5</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">B</th>\n",
       "      <th>En</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">C</th>\n",
       "      <th>En</th>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">D</th>\n",
       "      <th>En</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">E</th>\n",
       "      <th>En</th>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">F</th>\n",
       "      <th>En</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">H</th>\n",
       "      <th>En</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">I</th>\n",
       "      <th>En</th>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">J</th>\n",
       "      <th>En</th>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">K</th>\n",
       "      <th>En</th>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          期中  期末\n",
       "A En       8   4\n",
       "  Math     4   2\n",
       "  Python   5   9\n",
       "B En       1   2\n",
       "  Math     4   5\n",
       "  Python   8   6\n",
       "C En       1   7\n",
       "  Math     8   8\n",
       "  Python   9   8\n",
       "D En       8   4\n",
       "  Math     3   6\n",
       "  Python   4   9\n",
       "E En       4   9\n",
       "  Math     8   8\n",
       "  Python   5   1\n",
       "F En       5   4\n",
       "  Math     5   1\n",
       "  Python   7   6\n",
       "H En       6   6\n",
       "  Math     4   6\n",
       "  Python   4   3\n",
       "I En       0   8\n",
       "  Math     7   8\n",
       "  Python   7   6\n",
       "J En       0   9\n",
       "  Math     4   0\n",
       "  Python   4   0\n",
       "K En       4   2\n",
       "  Math     4   9\n",
       "  Python   2   0"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.unstack().stack(level = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    5.15\n",
       "Math      5.20\n",
       "En        4.60\n",
       "dtype: float64"
      ]
     },
     "execution_count": 129,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.mean() # 计算的是 列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A  期中    5.666667\n",
       "   期末    5.000000\n",
       "B  期中    4.333333\n",
       "   期末    4.333333\n",
       "C  期中    6.000000\n",
       "   期末    7.666667\n",
       "D  期中    5.000000\n",
       "   期末    6.333333\n",
       "E  期中    5.666667\n",
       "   期末    6.000000\n",
       "F  期中    5.666667\n",
       "   期末    3.666667\n",
       "H  期中    4.666667\n",
       "   期末    5.000000\n",
       "I  期中    4.666667\n",
       "   期末    7.333333\n",
       "J  期中    2.666667\n",
       "   期末    3.000000\n",
       "K  期中    3.333333\n",
       "   期末    3.666667\n",
       "dtype: float64"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.mean(axis = 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>期中</th>\n",
       "      <td>5.5</td>\n",
       "      <td>5.1</td>\n",
       "      <td>3.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>期末</th>\n",
       "      <td>4.8</td>\n",
       "      <td>5.3</td>\n",
       "      <td>5.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "期中     5.5   5.1  3.7\n",
       "期末     4.8   5.3  5.5"
      ]
     },
     "execution_count": 131,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.mean(level=1) # 计算期中期末所有学生的平均分"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>7.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>7.0</td>\n",
       "      <td>4.5</td>\n",
       "      <td>1.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>8.5</td>\n",
       "      <td>8.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>6.5</td>\n",
       "      <td>4.5</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>3.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>6.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>6.5</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3.5</td>\n",
       "      <td>5.0</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>6.5</td>\n",
       "      <td>7.5</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>1.0</td>\n",
       "      <td>6.5</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "A     7.0   3.0  6.0\n",
       "B     7.0   4.5  1.5\n",
       "C     8.5   8.0  4.0\n",
       "D     6.5   4.5  6.0\n",
       "E     3.0   8.0  6.5\n",
       "F     6.5   3.0  4.5\n",
       "H     3.5   5.0  6.0\n",
       "I     6.5   7.5  4.0\n",
       "J     2.0   2.0  4.5\n",
       "K     1.0   6.5  3.0"
      ]
     },
     "execution_count": 132,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.mean(level = 0) # 计算每位学生期中和期末平均分"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 数学和统计方法"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### 简单统计指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math  En\n",
       "Q       8     6   6\n",
       "W       2     7   0\n",
       "E       7     7   5\n",
       "R       9     2   9\n",
       "T       7     1   4\n",
       "Y       9     2   4\n",
       "U       3     0   8\n",
       "I       8     2   5\n",
       "O       1     2   6\n",
       "P       8     1   9\n",
       "A       2     4   5\n",
       "S       9     0   1\n",
       "D       5     7   3\n",
       "F       4     3   7\n",
       "G       4     9   2\n",
       "H       7     6   3\n",
       "J       1     0   1\n",
       "K       6     1   9\n",
       "L       7     3   1\n",
       "Z       8     3   8"
      ]
     },
     "execution_count": 133,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,10,size = (20,3)),\n",
    "                  columns=['Python','Math','En'],index = list('QWERTYUIOPASDFGHJKLZ'))\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>2</td>\n",
       "      <td>7</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>7.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>7</td>\n",
       "      <td>6</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>8</td>\n",
       "      <td>3</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "Q       8     6  6.0\n",
       "W       2     7  0.0\n",
       "E       7     7  5.0\n",
       "R       9     2  9.0\n",
       "T       7     1  4.0\n",
       "Y       9     2  4.0\n",
       "U       3     0  NaN\n",
       "I       8     2  5.0\n",
       "O       1     2  6.0\n",
       "P       8     1  9.0\n",
       "A       2     4  5.0\n",
       "S       9     0  1.0\n",
       "D       5     7  3.0\n",
       "F       4     3  7.0\n",
       "G       4     9  2.0\n",
       "H       7     6  3.0\n",
       "J       1     0  1.0\n",
       "K       6     1  9.0\n",
       "L       7     3  1.0\n",
       "Z       8     3  8.0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.iloc[6,2] = np.NAN\n",
    "display(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    20\n",
       "Math      20\n",
       "En        19\n",
       "dtype: int64"
      ]
     },
     "execution_count": 135,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.count() # 统计非空数据数量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    5.750000\n",
       "Math      3.300000\n",
       "En        4.631579\n",
       "dtype: float64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "Python    7.0\n",
       "Math      2.5\n",
       "En        5.0\n",
       "dtype: float64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(df.mean(),df.median()) # 平均值，中位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    1.0\n",
       "Math      0.0\n",
       "En        0.0\n",
       "dtype: float64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "Python    9.0\n",
       "Math      9.0\n",
       "En        9.0\n",
       "dtype: float64"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(df.min(),df.max()) # 最小值，最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([8, 2, 7, 9, 3, 1, 5, 4, 6])"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python'].unique() # 去除重复数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2    4\n",
       "7    3\n",
       "3    3\n",
       "1    3\n",
       "0    3\n",
       "6    2\n",
       "9    1\n",
       "4    1\n",
       "Name: Math, dtype: int64"
      ]
     },
     "execution_count": 139,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Math'].value_counts() # 统计出现的频次"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0.00</th>\n",
       "      <td>1.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.25</th>\n",
       "      <td>3.75</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.50</th>\n",
       "      <td>7.00</td>\n",
       "      <td>2.5</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.75</th>\n",
       "      <td>8.00</td>\n",
       "      <td>6.0</td>\n",
       "      <td>6.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.00</th>\n",
       "      <td>9.00</td>\n",
       "      <td>9.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Python  Math   En\n",
       "0.00    1.00   0.0  0.0\n",
       "0.25    3.75   1.0  2.5\n",
       "0.50    7.00   2.5  5.0\n",
       "0.75    8.00   6.0  6.5\n",
       "1.00    9.00   9.0  9.0"
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.quantile(q = [0,0.25,0.5,0.75,1]) # 百分位数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>20.0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>19.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>5.8</td>\n",
       "      <td>3.3</td>\n",
       "      <td>4.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>2.8</td>\n",
       "      <td>2.8</td>\n",
       "      <td>2.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>3.8</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>7.0</td>\n",
       "      <td>2.5</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>8.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>6.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>9.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Python  Math    En\n",
       "count    20.0  20.0  19.0\n",
       "mean      5.8   3.3   4.6\n",
       "std       2.8   2.8   2.9\n",
       "min       1.0   0.0   0.0\n",
       "25%       3.8   1.0   2.5\n",
       "50%       7.0   2.5   5.0\n",
       "75%       8.0   6.0   6.5\n",
       "max       9.0   9.0   9.0"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe().round(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 索引标签、位置获取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 142,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python'].argmax() # 返回最大值索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 143,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['En'].argmin() # 最小值索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    R\n",
       "Math      G\n",
       "En        R\n",
       "dtype: object"
      ]
     },
     "execution_count": 144,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.idxmax() # 返回最大值的标签"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    O\n",
       "Math      U\n",
       "En        W\n",
       "dtype: object"
      ]
     },
     "execution_count": 145,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.idxmin() # 返回最小值标签"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 更多统计指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>10</td>\n",
       "      <td>13</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>17</td>\n",
       "      <td>20</td>\n",
       "      <td>11.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>26</td>\n",
       "      <td>22</td>\n",
       "      <td>20.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>33</td>\n",
       "      <td>23</td>\n",
       "      <td>24.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>42</td>\n",
       "      <td>25</td>\n",
       "      <td>28.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>45</td>\n",
       "      <td>25</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>53</td>\n",
       "      <td>27</td>\n",
       "      <td>33.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>54</td>\n",
       "      <td>29</td>\n",
       "      <td>39.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>62</td>\n",
       "      <td>30</td>\n",
       "      <td>48.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>64</td>\n",
       "      <td>34</td>\n",
       "      <td>53.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>73</td>\n",
       "      <td>34</td>\n",
       "      <td>54.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>78</td>\n",
       "      <td>41</td>\n",
       "      <td>57.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>82</td>\n",
       "      <td>44</td>\n",
       "      <td>64.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>86</td>\n",
       "      <td>53</td>\n",
       "      <td>66.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>93</td>\n",
       "      <td>59</td>\n",
       "      <td>69.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>94</td>\n",
       "      <td>59</td>\n",
       "      <td>70.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>100</td>\n",
       "      <td>60</td>\n",
       "      <td>79.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>107</td>\n",
       "      <td>63</td>\n",
       "      <td>80.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>115</td>\n",
       "      <td>66</td>\n",
       "      <td>88.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math    En\n",
       "Q       8     6   6.0\n",
       "W      10    13   6.0\n",
       "E      17    20  11.0\n",
       "R      26    22  20.0\n",
       "T      33    23  24.0\n",
       "Y      42    25  28.0\n",
       "U      45    25   NaN\n",
       "I      53    27  33.0\n",
       "O      54    29  39.0\n",
       "P      62    30  48.0\n",
       "A      64    34  53.0\n",
       "S      73    34  54.0\n",
       "D      78    41  57.0\n",
       "F      82    44  64.0\n",
       "G      86    53  66.0\n",
       "H      93    59  69.0\n",
       "J      94    59  70.0\n",
       "K     100    60  79.0\n",
       "L     107    63  80.0\n",
       "Z     115    66  88.0"
      ]
     },
     "execution_count": 146,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cumsum() # 累加和"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>16</td>\n",
       "      <td>42</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>112</td>\n",
       "      <td>294</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>1008</td>\n",
       "      <td>588</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>7056</td>\n",
       "      <td>588</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>63504</td>\n",
       "      <td>1176</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>190512</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1524096</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>1524096</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>12192768</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>24385536</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>219469824</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>1097349120</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>4389396480</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>17557585920</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>122903101440</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>122903101440</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>737418608640</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>5161930260480</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>41295442083840</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Python  Math   En\n",
       "Q               8     6  6.0\n",
       "W              16    42  0.0\n",
       "E             112   294  0.0\n",
       "R            1008   588  0.0\n",
       "T            7056   588  0.0\n",
       "Y           63504  1176  0.0\n",
       "U          190512     0  NaN\n",
       "I         1524096     0  0.0\n",
       "O         1524096     0  0.0\n",
       "P        12192768     0  0.0\n",
       "A        24385536     0  0.0\n",
       "S       219469824     0  0.0\n",
       "D      1097349120     0  0.0\n",
       "F      4389396480     0  0.0\n",
       "G     17557585920     0  0.0\n",
       "H    122903101440     0  0.0\n",
       "J    122903101440     0  0.0\n",
       "K    737418608640     0  0.0\n",
       "L   5161930260480     0  0.0\n",
       "Z  41295442083840     0  0.0"
      ]
     },
     "execution_count": 147,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cumprod() # 累乘和"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 149,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "Q       8     6  6.0\n",
       "W       2     6  0.0\n",
       "E       2     6  0.0\n",
       "R       2     2  0.0\n",
       "T       2     1  0.0\n",
       "Y       2     1  0.0\n",
       "U       2     0  NaN\n",
       "I       2     0  0.0\n",
       "O       1     0  0.0\n",
       "P       1     0  0.0\n",
       "A       1     0  0.0\n",
       "S       1     0  0.0\n",
       "D       1     0  0.0\n",
       "F       1     0  0.0\n",
       "G       1     0  0.0\n",
       "H       1     0  0.0\n",
       "J       1     0  0.0\n",
       "K       1     0  0.0\n",
       "L       1     0  0.0\n",
       "Z       1     0  0.0"
      ]
     },
     "execution_count": 149,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cummin() # 累计最小值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 150,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "Q       8     6  6.0\n",
       "W       8     7  6.0\n",
       "E       8     7  6.0\n",
       "R       9     7  9.0\n",
       "T       9     7  9.0\n",
       "Y       9     7  9.0\n",
       "U       9     7  NaN\n",
       "I       9     7  9.0\n",
       "O       9     7  9.0\n",
       "P       9     7  9.0\n",
       "A       9     7  9.0\n",
       "S       9     7  9.0\n",
       "D       9     7  9.0\n",
       "F       9     7  9.0\n",
       "G       9     9  9.0\n",
       "H       9     9  9.0\n",
       "J       9     9  9.0\n",
       "K       9     9  9.0\n",
       "L       9     9  9.0\n",
       "Z       9     9  9.0"
      ]
     },
     "execution_count": 150,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cummax() # 累计最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    2.769667\n",
       "Math      2.754900\n",
       "En        2.909955\n",
       "dtype: float64"
      ]
     },
     "execution_count": 151,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.std() # 标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 152,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    7.671053\n",
       "Math      7.589474\n",
       "En        8.467836\n",
       "dtype: float64"
      ]
     },
     "execution_count": 152,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.var()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 153,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>-6.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>-6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>5.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>2.0</td>\n",
       "      <td>-5.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>-2.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>-5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>-6.0</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>5.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>-7.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>7.0</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>-6.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>-4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>7.0</td>\n",
       "      <td>-4.0</td>\n",
       "      <td>-4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>-4.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>-1.0</td>\n",
       "      <td>-4.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>0.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>-5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>3.0</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>-6.0</td>\n",
       "      <td>-6.0</td>\n",
       "      <td>-2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>5.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>-8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>7.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Math   En\n",
       "Q     NaN   NaN  NaN\n",
       "W    -6.0   1.0 -6.0\n",
       "E     5.0   0.0  5.0\n",
       "R     2.0  -5.0  4.0\n",
       "T    -2.0  -1.0 -5.0\n",
       "Y     2.0   1.0  0.0\n",
       "U    -6.0  -2.0  NaN\n",
       "I     5.0   2.0  NaN\n",
       "O    -7.0   0.0  1.0\n",
       "P     7.0  -1.0  3.0\n",
       "A    -6.0   3.0 -4.0\n",
       "S     7.0  -4.0 -4.0\n",
       "D    -4.0   7.0  2.0\n",
       "F    -1.0  -4.0  4.0\n",
       "G     0.0   6.0 -5.0\n",
       "H     3.0  -3.0  1.0\n",
       "J    -6.0  -6.0 -2.0\n",
       "K     5.0   1.0  8.0\n",
       "L     1.0   2.0 -8.0\n",
       "Z     1.0   0.0  7.0"
      ]
     },
     "execution_count": 153,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.diff() # 差分，当前数据减去上一个的差值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>-0.750</td>\n",
       "      <td>0.167</td>\n",
       "      <td>-1.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>2.500</td>\n",
       "      <td>0.000</td>\n",
       "      <td>inf</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>0.286</td>\n",
       "      <td>-0.714</td>\n",
       "      <td>0.800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>-0.222</td>\n",
       "      <td>-0.500</td>\n",
       "      <td>-0.556</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>0.286</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>-0.667</td>\n",
       "      <td>-1.000</td>\n",
       "      <td>0.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>1.667</td>\n",
       "      <td>inf</td>\n",
       "      <td>0.250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>-0.875</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>7.000</td>\n",
       "      <td>-0.500</td>\n",
       "      <td>0.500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>-0.750</td>\n",
       "      <td>3.000</td>\n",
       "      <td>-0.444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>3.500</td>\n",
       "      <td>-1.000</td>\n",
       "      <td>-0.800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>-0.444</td>\n",
       "      <td>inf</td>\n",
       "      <td>2.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>-0.200</td>\n",
       "      <td>-0.571</td>\n",
       "      <td>1.333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>0.000</td>\n",
       "      <td>2.000</td>\n",
       "      <td>-0.714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>0.750</td>\n",
       "      <td>-0.333</td>\n",
       "      <td>0.500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>-0.857</td>\n",
       "      <td>-1.000</td>\n",
       "      <td>-0.667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>5.000</td>\n",
       "      <td>inf</td>\n",
       "      <td>8.000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>0.167</td>\n",
       "      <td>2.000</td>\n",
       "      <td>-0.889</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>0.143</td>\n",
       "      <td>0.000</td>\n",
       "      <td>7.000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python   Math     En\n",
       "Q     NaN    NaN    NaN\n",
       "W  -0.750  0.167 -1.000\n",
       "E   2.500  0.000    inf\n",
       "R   0.286 -0.714  0.800\n",
       "T  -0.222 -0.500 -0.556\n",
       "Y   0.286  1.000  0.000\n",
       "U  -0.667 -1.000  0.000\n",
       "I   1.667    inf  0.250\n",
       "O  -0.875  0.000  0.200\n",
       "P   7.000 -0.500  0.500\n",
       "A  -0.750  3.000 -0.444\n",
       "S   3.500 -1.000 -0.800\n",
       "D  -0.444    inf  2.000\n",
       "F  -0.200 -0.571  1.333\n",
       "G   0.000  2.000 -0.714\n",
       "H   0.750 -0.333  0.500\n",
       "J  -0.857 -1.000 -0.667\n",
       "K   5.000    inf  8.000\n",
       "L   0.167  2.000 -0.889\n",
       "Z   0.143  0.000  7.000"
      ]
     },
     "execution_count": 154,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.pct_change().round(3) # 计算百分比变化"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 高级统计指标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>7.671053</td>\n",
       "      <td>-0.815789</td>\n",
       "      <td>2.459064</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>-0.815789</td>\n",
       "      <td>7.589474</td>\n",
       "      <td>-2.204678</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>En</th>\n",
       "      <td>2.459064</td>\n",
       "      <td>-2.204678</td>\n",
       "      <td>8.467836</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python      Math        En\n",
       "Python  7.671053 -0.815789  2.459064\n",
       "Math   -0.815789  7.589474 -2.204678\n",
       "En      2.459064 -2.204678  8.467836"
      ]
     },
     "execution_count": 155,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.cov() # 协方差：自己和别人计算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 156,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    7.671053\n",
       "Math      7.589474\n",
       "En        8.467836\n",
       "dtype: float64"
      ]
     },
     "execution_count": 156,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.var() # 方差： 自己和自己计算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.8157894736842103"
      ]
     },
     "execution_count": 157,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['Python'].cov(df['Math'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Python</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>-0.106917</td>\n",
       "      <td>0.305430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Math</th>\n",
       "      <td>-0.106917</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>-0.278997</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>En</th>\n",
       "      <td>0.305430</td>\n",
       "      <td>-0.278997</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python      Math        En\n",
       "Python  1.000000 -0.106917  0.305430\n",
       "Math   -0.106917  1.000000 -0.278997\n",
       "En      0.305430 -0.278997  1.000000"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.corr() # 相关性系数 -1 ~ 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Python    0.305430\n",
       "Math     -0.278997\n",
       "En        1.000000\n",
       "dtype: float64"
      ]
     },
     "execution_count": 159,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.corrwith(df['En']) # 一列的相关性系数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 160,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>7</td>\n",
       "      <td>17</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>19</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>4</td>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>19</td>\n",
       "      <td>3</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>16</td>\n",
       "      <td>15</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>8</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>16</td>\n",
       "      <td>5</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>13</td>\n",
       "      <td>8</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>15</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "Q       8           7     13\n",
       "W      12          13     14\n",
       "E       1          11      0\n",
       "R       7          17     12\n",
       "T       1           4      4\n",
       "Y      19           8      0\n",
       "U       1           5      3\n",
       "I       0          17     15\n",
       "O       4          16     13\n",
       "P      19           3      8\n",
       "A      16          15     14\n",
       "S       0          13     17\n",
       "D       5           4     19\n",
       "F       0           8      4\n",
       "G       8          13     14\n",
       "H      16           5     10\n",
       "J      13           8     17\n",
       "K       0          12      6\n",
       "L       2           4      9\n",
       "Z      15          10      0"
      ]
     },
     "execution_count": 160,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,20,size = (20,3)),\n",
    "                  columns=['Python','Tensorflow','Keras'],index = list('QWERTYUIOPASDFGHJKLZ'))\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>15</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>19</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>7</td>\n",
       "      <td>17</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>19</td>\n",
       "      <td>3</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>4</td>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>13</td>\n",
       "      <td>8</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>16</td>\n",
       "      <td>5</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>8</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>16</td>\n",
       "      <td>15</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "Z      15          10      0\n",
       "Y      19           8      0\n",
       "W      12          13     14\n",
       "U       1           5      3\n",
       "T       1           4      4\n",
       "S       0          13     17\n",
       "R       7          17     12\n",
       "Q       8           7     13\n",
       "P      19           3      8\n",
       "O       4          16     13\n",
       "L       2           4      9\n",
       "K       0          12      6\n",
       "J      13           8     17\n",
       "I       0          17     15\n",
       "H      16           5     10\n",
       "G       8          13     14\n",
       "F       0           8      4\n",
       "E       1          11      0\n",
       "D       5           4     19\n",
       "A      16          15     14"
      ]
     },
     "execution_count": 161,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_index(axis = 0,ascending=False) # 降序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 162,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>16</td>\n",
       "      <td>15</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>8</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>16</td>\n",
       "      <td>5</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>13</td>\n",
       "      <td>8</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>4</td>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>19</td>\n",
       "      <td>3</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>7</td>\n",
       "      <td>17</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>19</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>15</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "A      16          15     14\n",
       "D       5           4     19\n",
       "E       1          11      0\n",
       "F       0           8      4\n",
       "G       8          13     14\n",
       "H      16           5     10\n",
       "I       0          17     15\n",
       "J      13           8     17\n",
       "K       0          12      6\n",
       "L       2           4      9\n",
       "O       4          16     13\n",
       "P      19           3      8\n",
       "Q       8           7     13\n",
       "R       7          17     12\n",
       "S       0          13     17\n",
       "T       1           4      4\n",
       "U       1           5      3\n",
       "W      12          13     14\n",
       "Y      19           8      0\n",
       "Z      15          10      0"
      ]
     },
     "execution_count": 162,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_index(ascending=True) # 升序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 163,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>4</td>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>7</td>\n",
       "      <td>17</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>8</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>13</td>\n",
       "      <td>8</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>15</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>16</td>\n",
       "      <td>15</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>16</td>\n",
       "      <td>5</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>19</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>19</td>\n",
       "      <td>3</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "K       0          12      6\n",
       "I       0          17     15\n",
       "S       0          13     17\n",
       "F       0           8      4\n",
       "E       1          11      0\n",
       "T       1           4      4\n",
       "U       1           5      3\n",
       "L       2           4      9\n",
       "O       4          16     13\n",
       "D       5           4     19\n",
       "R       7          17     12\n",
       "Q       8           7     13\n",
       "G       8          13     14\n",
       "W      12          13     14\n",
       "J      13           8     17\n",
       "Z      15          10      0\n",
       "A      16          15     14\n",
       "H      16           5     10\n",
       "Y      19           8      0\n",
       "P      19           3      8"
      ]
     },
     "execution_count": 163,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_values(by = 'Python',ascending=True) # 根据Python属性进行升序排列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K</th>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>S</th>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>I</th>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>L</th>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>O</th>\n",
       "      <td>4</td>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>R</th>\n",
       "      <td>7</td>\n",
       "      <td>17</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Q</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>G</th>\n",
       "      <td>8</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>W</th>\n",
       "      <td>12</td>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>J</th>\n",
       "      <td>13</td>\n",
       "      <td>8</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>15</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>16</td>\n",
       "      <td>5</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>16</td>\n",
       "      <td>15</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>19</td>\n",
       "      <td>3</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>19</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "F       0           8      4\n",
       "K       0          12      6\n",
       "S       0          13     17\n",
       "I       0          17     15\n",
       "T       1           4      4\n",
       "U       1           5      3\n",
       "E       1          11      0\n",
       "L       2           4      9\n",
       "O       4          16     13\n",
       "D       5           4     19\n",
       "R       7          17     12\n",
       "Q       8           7     13\n",
       "G       8          13     14\n",
       "W      12          13     14\n",
       "J      13           8     17\n",
       "Z      15          10      0\n",
       "H      16           5     10\n",
       "A      16          15     14\n",
       "P      19           3      8\n",
       "Y      19           8      0"
      ]
     },
     "execution_count": 164,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_values(by = ['Python','Tensorflow'],ascending=True) \n",
    "# 先根据Python进行排序，如果相等在根据Tensorflow排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 165,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>19</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>P</th>\n",
       "      <td>19</td>\n",
       "      <td>3</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>16</td>\n",
       "      <td>15</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>H</th>\n",
       "      <td>16</td>\n",
       "      <td>5</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>15</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "Y      19           8      0\n",
       "P      19           3      8\n",
       "A      16          15     14\n",
       "H      16           5     10\n",
       "Z      15          10      0"
      ]
     },
     "execution_count": 165,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.nlargest(n = 5,columns='Python') # 根据Python进行排序，获取最大的5个数值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Tensorflow</th>\n",
       "      <th>Keras</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Y</th>\n",
       "      <td>19</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Z</th>\n",
       "      <td>15</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>U</th>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>T</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Python  Tensorflow  Keras\n",
       "E       1          11      0\n",
       "Y      19           8      0\n",
       "Z      15          10      0\n",
       "U       1           5      3\n",
       "T       1           4      4"
      ]
     },
     "execution_count": 166,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.nsmallest(5,columns='Keras') # 根据Keras进行排序，获取最小的5个"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 分箱操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 167,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>21</td>\n",
       "      <td>76</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>70</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>63</td>\n",
       "      <td>40</td>\n",
       "      <td>140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>80</td>\n",
       "      <td>64</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>131</td>\n",
       "      <td>67</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>122</td>\n",
       "      <td>67</td>\n",
       "      <td>102</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>130</td>\n",
       "      <td>27</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>45</td>\n",
       "      <td>32</td>\n",
       "      <td>87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>64</td>\n",
       "      <td>122</td>\n",
       "      <td>116</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>138</td>\n",
       "      <td>46</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En\n",
       "0       21    76   35\n",
       "1       70     6    2\n",
       "2       63    40  140\n",
       "3       80    64   27\n",
       "4      131    67   11\n",
       "..     ...   ...  ...\n",
       "95     122    67  102\n",
       "96     130    27   58\n",
       "97      45    32   87\n",
       "98      64   122  116\n",
       "99     138    46   86\n",
       "\n",
       "[100 rows x 3 columns]"
      ]
     },
     "execution_count": 167,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randint(0,151,size = (100,3)),\n",
    "                  columns=['Python','Math','En'])\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0     不及格\n",
       "1      及格\n",
       "2      及格\n",
       "3      中等\n",
       "4      优秀\n",
       "     ... \n",
       "95     优秀\n",
       "96     优秀\n",
       "97     及格\n",
       "98     及格\n",
       "99     优秀\n",
       "Name: Python, Length: 100, dtype: category\n",
       "Categories (4, object): ['不及格' < '及格' < '中等' < '优秀']"
      ]
     },
     "execution_count": 168,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 等宽\n",
    "pd.cut(df.Python,\n",
    "       bins = 4, # 等宽分成四份\n",
    "       labels=['不及格','及格','中等','优秀'],\n",
    "       right = True)# 区间，闭区间"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 169,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "优秀     32\n",
       "及格     24\n",
       "不及格    24\n",
       "中等     20\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 169,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.cut(df.Python,\n",
    "       bins = 4, # 等宽分成四份\n",
    "       labels=['不及格','及格','中等','优秀'],\n",
    "       right = True).value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 170,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "      <th>等级</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>21</td>\n",
       "      <td>76</td>\n",
       "      <td>35</td>\n",
       "      <td>极差</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>70</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>及格</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>63</td>\n",
       "      <td>40</td>\n",
       "      <td>140</td>\n",
       "      <td>及格</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>80</td>\n",
       "      <td>64</td>\n",
       "      <td>27</td>\n",
       "      <td>及格</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>131</td>\n",
       "      <td>67</td>\n",
       "      <td>11</td>\n",
       "      <td>优秀</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>122</td>\n",
       "      <td>67</td>\n",
       "      <td>102</td>\n",
       "      <td>优秀</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>130</td>\n",
       "      <td>27</td>\n",
       "      <td>58</td>\n",
       "      <td>优秀</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>45</td>\n",
       "      <td>32</td>\n",
       "      <td>87</td>\n",
       "      <td>不及格</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>64</td>\n",
       "      <td>122</td>\n",
       "      <td>116</td>\n",
       "      <td>及格</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>138</td>\n",
       "      <td>46</td>\n",
       "      <td>86</td>\n",
       "      <td>优秀</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    Python  Math   En   等级\n",
       "0       21    76   35   极差\n",
       "1       70     6    2   及格\n",
       "2       63    40  140   及格\n",
       "3       80    64   27   及格\n",
       "4      131    67   11   优秀\n",
       "..     ...   ...  ...  ...\n",
       "95     122    67  102   优秀\n",
       "96     130    27   58   优秀\n",
       "97      45    32   87  不及格\n",
       "98      64   122  116   及格\n",
       "99     138    46   86   优秀\n",
       "\n",
       "[100 rows x 4 columns]"
      ]
     },
     "execution_count": 170,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['等级'] = pd.cut(df.Python,\n",
    "       bins = [0,30,60,90,120,150],\n",
    "       labels=['极差','不及格','及格','中等','优秀'])\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "中等     26\n",
       "及格     25\n",
       "不及格    25\n",
       "优秀     24\n",
       "Name: Python, dtype: int64"
      ]
     },
     "execution_count": 171,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 等频\n",
    "pd.qcut(df.Python,q = 4,labels=['不及格','及格','中等','优秀']).value_counts()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 分组聚合"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 分组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 172,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>8</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>4</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   0  1  2\n",
       "0  3  6  7\n",
       "1  0  7  0\n",
       "2  6  6  5\n",
       "3  3  9  9\n",
       "4  8  4  6\n",
       "5  8  5  2\n",
       "6  8  1  8\n",
       "7  8  0  8\n",
       "8  8  1  6\n",
       "9  4  7  1"
      ]
     },
     "execution_count": 172,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.DataFrame(np.random.randint(0,10,size = (10,3)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 173,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>女</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>86</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>男</td>\n",
       "      <td>5</td>\n",
       "      <td>116</td>\n",
       "      <td>88</td>\n",
       "      <td>133</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>男</td>\n",
       "      <td>1</td>\n",
       "      <td>27</td>\n",
       "      <td>1</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>男</td>\n",
       "      <td>1</td>\n",
       "      <td>128</td>\n",
       "      <td>11</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>女</td>\n",
       "      <td>1</td>\n",
       "      <td>33</td>\n",
       "      <td>40</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>295</th>\n",
       "      <td>女</td>\n",
       "      <td>3</td>\n",
       "      <td>86</td>\n",
       "      <td>94</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>女</td>\n",
       "      <td>7</td>\n",
       "      <td>135</td>\n",
       "      <td>81</td>\n",
       "      <td>91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>女</td>\n",
       "      <td>2</td>\n",
       "      <td>150</td>\n",
       "      <td>0</td>\n",
       "      <td>56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>男</td>\n",
       "      <td>7</td>\n",
       "      <td>93</td>\n",
       "      <td>31</td>\n",
       "      <td>61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299</th>\n",
       "      <td>男</td>\n",
       "      <td>1</td>\n",
       "      <td>61</td>\n",
       "      <td>86</td>\n",
       "      <td>79</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>300 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    sex  class  Python  Math   En\n",
       "0     女      4       1    86  135\n",
       "1     男      5     116    88  133\n",
       "2     男      1      27     1   70\n",
       "3     男      1     128    11   63\n",
       "4     女      1      33    40   41\n",
       "..   ..    ...     ...   ...  ...\n",
       "295   女      3      86    94   45\n",
       "296   女      7     135    81   91\n",
       "297   女      2     150     0   56\n",
       "298   男      7      93    31   61\n",
       "299   男      1      61    86   79\n",
       "\n",
       "[300 rows x 5 columns]"
      ]
     },
     "execution_count": 173,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = {'sex':np.random.randint(0,2,size = 300),\n",
    "                          'class':np.random.randint(1,9,size = 300),\n",
    "                          'Python':np.random.randint(0,151,size = 300),\n",
    "                          'Math':np.random.randint(0,151,size = 300),\n",
    "                          'En':np.random.randint(0,151,size = 300)})\n",
    "df['sex'] = df['sex'].map({0:'男',1:'女'})\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 174,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女\n",
      "    sex  class  Python  Math   En\n",
      "0     女      4       1    86  135\n",
      "4     女      1      33    40   41\n",
      "6     女      1     145    94   56\n",
      "7     女      3      87   109  134\n",
      "8     女      5      86    57    4\n",
      "..   ..    ...     ...   ...  ...\n",
      "290   女      1      52     2   64\n",
      "291   女      4     138    99   75\n",
      "295   女      3      86    94   45\n",
      "296   女      7     135    81   91\n",
      "297   女      2     150     0   56\n",
      "\n",
      "[151 rows x 5 columns]\n",
      "男\n",
      "    sex  class  Python  Math   En\n",
      "1     男      5     116    88  133\n",
      "2     男      1      27     1   70\n",
      "3     男      1     128    11   63\n",
      "5     男      1      65   139  112\n",
      "9     男      3      10    48   20\n",
      "..   ..    ...     ...   ...  ...\n",
      "292   男      5     137   124   40\n",
      "293   男      8     104    67  113\n",
      "294   男      5       1   115    5\n",
      "298   男      7      93    31   61\n",
      "299   男      1      61    86   79\n",
      "\n",
      "[149 rows x 5 columns]\n"
     ]
    }
   ],
   "source": [
    "# 单分组\n",
    "for name,group in df.groupby(by = 'sex'): # 分两组\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 175,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('女', 1)\n",
      "    sex  class  Python  Math   En\n",
      "4     女      1      33    40   41\n",
      "6     女      1     145    94   56\n",
      "44    女      1     130     3  146\n",
      "46    女      1     112   144   11\n",
      "74    女      1      25    92   79\n",
      "76    女      1      95    49   26\n",
      "91    女      1      95    21    7\n",
      "120   女      1     102    78  127\n",
      "142   女      1      63     5   13\n",
      "158   女      1      29   150  129\n",
      "161   女      1     127   119   42\n",
      "165   女      1      45   143   38\n",
      "166   女      1     149    20  122\n",
      "175   女      1      97   129  117\n",
      "197   女      1     126     8  142\n",
      "200   女      1      22    79   70\n",
      "202   女      1      45    18  140\n",
      "213   女      1       6   132  117\n",
      "245   女      1      48   131    8\n",
      "255   女      1     122    74   80\n",
      "260   女      1      45    11   65\n",
      "266   女      1      92    28   71\n",
      "290   女      1      52     2   64\n",
      "('女', 2)\n",
      "    sex  class  Python  Math   En\n",
      "19    女      2      60    51   67\n",
      "21    女      2      13    30   51\n",
      "36    女      2      61   129   65\n",
      "40    女      2      87    16   74\n",
      "41    女      2     121   133  115\n",
      "48    女      2     118    66  127\n",
      "50    女      2     130    60   29\n",
      "70    女      2      21   112   30\n",
      "75    女      2     123   108   78\n",
      "84    女      2       8    75   54\n",
      "89    女      2      45    92   63\n",
      "94    女      2      39    22   58\n",
      "100   女      2     109   130   75\n",
      "101   女      2      48    14   42\n",
      "114   女      2      57    80   47\n",
      "115   女      2      84   113   25\n",
      "144   女      2      90   124   36\n",
      "204   女      2      64   143   31\n",
      "244   女      2     108   114   39\n",
      "259   女      2      99    19   87\n",
      "268   女      2      16   102   98\n",
      "276   女      2      26   110   52\n",
      "281   女      2      40   131   79\n",
      "297   女      2     150     0   56\n",
      "('女', 3)\n",
      "    sex  class  Python  Math   En\n",
      "7     女      3      87   109  134\n",
      "15    女      3      63   138   65\n",
      "34    女      3      46    95  140\n",
      "107   女      3      65   136   42\n",
      "110   女      3      17    94  122\n",
      "122   女      3       9   112   94\n",
      "131   女      3      36   105   12\n",
      "155   女      3     138   148  145\n",
      "185   女      3     118   119   62\n",
      "192   女      3      81    17   88\n",
      "231   女      3      78    78  119\n",
      "251   女      3     135   113   49\n",
      "295   女      3      86    94   45\n",
      "('女', 4)\n",
      "    sex  class  Python  Math   En\n",
      "0     女      4       1    86  135\n",
      "37    女      4      53    25   41\n",
      "67    女      4      53    14  141\n",
      "77    女      4     122    83   75\n",
      "80    女      4     100    22    2\n",
      "162   女      4     105    18   11\n",
      "168   女      4      36    60   82\n",
      "215   女      4      68    52   83\n",
      "217   女      4      87   149   38\n",
      "221   女      4      39    42   49\n",
      "226   女      4      12   148   94\n",
      "247   女      4      14     5   99\n",
      "278   女      4      14   148   48\n",
      "282   女      4      86    83   74\n",
      "291   女      4     138    99   75\n",
      "('女', 5)\n",
      "    sex  class  Python  Math   En\n",
      "8     女      5      86    57    4\n",
      "18    女      5      10    27  129\n",
      "23    女      5      75    93   11\n",
      "61    女      5     100    21   81\n",
      "62    女      5      96    61   88\n",
      "85    女      5      72   108   91\n",
      "95    女      5      90    41  103\n",
      "112   女      5     105    48   17\n",
      "117   女      5     112    14   61\n",
      "124   女      5      43    63  109\n",
      "206   女      5     144   101   95\n",
      "239   女      5      15    41   78\n",
      "241   女      5      66   124   10\n",
      "256   女      5     111   122   34\n",
      "263   女      5     107    94  107\n",
      "287   女      5      40    20   96\n",
      "288   女      5     113    77   96\n",
      "('女', 6)\n",
      "    sex  class  Python  Math   En\n",
      "22    女      6      62    43   84\n",
      "29    女      6      15    45  145\n",
      "38    女      6     143   123   25\n",
      "47    女      6       7    11   38\n",
      "49    女      6     108    33   61\n",
      "53    女      6     134    85  120\n",
      "69    女      6      80   131  138\n",
      "83    女      6     141   136  118\n",
      "88    女      6      40     3   69\n",
      "129   女      6       5    36   66\n",
      "138   女      6      25    33   17\n",
      "171   女      6      92    28  138\n",
      "183   女      6     106   147  150\n",
      "187   女      6     109   126   10\n",
      "195   女      6     103   130  132\n",
      "207   女      6      52   141  129\n",
      "224   女      6      58    64    9\n",
      "236   女      6     137    60   23\n",
      "248   女      6      17    93  121\n",
      "249   女      6      33    29   19\n",
      "250   女      6     144    14   83\n",
      "258   女      6      39    98   52\n",
      "('女', 7)\n",
      "    sex  class  Python  Math   En\n",
      "13    女      7     138   149   85\n",
      "35    女      7       0    61   54\n",
      "51    女      7      99   129  142\n",
      "59    女      7      51    89   28\n",
      "60    女      7      84    78   25\n",
      "68    女      7      61   134   18\n",
      "81    女      7     150    66    1\n",
      "98    女      7      90   106  144\n",
      "116   女      7     136    36   54\n",
      "133   女      7     126    47  124\n",
      "145   女      7      48    52   24\n",
      "149   女      7     104    32   95\n",
      "169   女      7      98    95    9\n",
      "188   女      7      33     4   12\n",
      "201   女      7       3   150   15\n",
      "205   女      7      95   119   74\n",
      "222   女      7      35   119  148\n",
      "240   女      7     115    79   37\n",
      "273   女      7      28    68   63\n",
      "286   女      7       5    96  136\n",
      "296   女      7     135    81   91\n",
      "('女', 8)\n",
      "    sex  class  Python  Math   En\n",
      "45    女      8     109    84   51\n",
      "57    女      8      11    88  129\n",
      "66    女      8      13   107   22\n",
      "78    女      8      90    10   51\n",
      "87    女      8      13    78   97\n",
      "103   女      8      69     5   84\n",
      "106   女      8      55    53   91\n",
      "123   女      8     101   143   68\n",
      "127   女      8      97   117  105\n",
      "137   女      8     139   113  127\n",
      "140   女      8      43    26   35\n",
      "164   女      8      55    66   21\n",
      "178   女      8     128    40  142\n",
      "182   女      8      96    44   90\n",
      "246   女      8       0     0  117\n",
      "275   女      8      97    10  100\n",
      "('男', 1)\n",
      "    sex  class  Python  Math   En\n",
      "2     男      1      27     1   70\n",
      "3     男      1     128    11   63\n",
      "5     男      1      65   139  112\n",
      "12    男      1      78    74  145\n",
      "16    男      1      94     2   25\n",
      "30    男      1      36    87  118\n",
      "71    男      1     105    82  105\n",
      "92    男      1      72    64  130\n",
      "97    男      1     109    53   67\n",
      "104   男      1     108    10  146\n",
      "126   男      1     130    50  105\n",
      "135   男      1     114   104   11\n",
      "136   男      1      11    41  127\n",
      "156   男      1     116   105   34\n",
      "174   男      1      34    10  138\n",
      "189   男      1     112   109   80\n",
      "193   男      1       4   138   83\n",
      "199   男      1      78   134   83\n",
      "211   男      1       0   149   88\n",
      "216   男      1      89    96   60\n",
      "228   男      1     127   141   43\n",
      "229   男      1      26   147  108\n",
      "252   男      1     134    98   48\n",
      "254   男      1     135   125   81\n",
      "283   男      1      92    41   79\n",
      "285   男      1      11    78  132\n",
      "289   男      1      32   109  137\n",
      "299   男      1      61    86   79\n",
      "('男', 2)\n",
      "    sex  class  Python  Math   En\n",
      "17    男      2     122    70  137\n",
      "26    男      2      38     6   94\n",
      "32    男      2      79    93   14\n",
      "33    男      2      85   138   28\n",
      "54    男      2      73    26  131\n",
      "79    男      2     127   128   49\n",
      "102   男      2      69    20   23\n",
      "132   男      2     121   150   77\n",
      "151   男      2      58    75  127\n",
      "157   男      2     122   109  132\n",
      "180   男      2      77    17   93\n",
      "190   男      2     102   122   82\n",
      "194   男      2      60    91   84\n",
      "219   男      2       7    91   91\n",
      "257   男      2     107    92   58\n",
      "277   男      2      97   119   81\n",
      "279   男      2     145    32   31\n",
      "('男', 3)\n",
      "    sex  class  Python  Math   En\n",
      "9     男      3      10    48   20\n",
      "31    男      3     123    89  105\n",
      "39    男      3     112     3  111\n",
      "58    男      3      97    47  144\n",
      "121   男      3     101    93   33\n",
      "128   男      3      38    93  123\n",
      "167   男      3      16    24  128\n",
      "176   男      3      28    19   66\n",
      "186   男      3      11    80  126\n",
      "208   男      3      42    80   75\n",
      "218   男      3      45   121    6\n",
      "223   男      3      68    32    8\n",
      "230   男      3     114    50   83\n",
      "264   男      3      73    80  105\n",
      "265   男      3      66    17   44\n",
      "267   男      3      24   128   81\n",
      "272   男      3      14    78  123\n",
      "280   男      3      39    26   93\n",
      "('男', 4)\n",
      "    sex  class  Python  Math   En\n",
      "10    男      4      58    77  146\n",
      "55    男      4      48    30   71\n",
      "63    男      4      58     0   59\n",
      "86    男      4      76    13  147\n",
      "105   男      4     111    10  100\n",
      "130   男      4     101   105   88\n",
      "139   男      4     131   110   79\n",
      "148   男      4      10   135  109\n",
      "150   男      4     146    36   30\n",
      "153   男      4     100   116   44\n",
      "172   男      4      81    21   42\n",
      "177   男      4      75    37   39\n",
      "203   男      4     148    41  105\n",
      "210   男      4      76    59   71\n",
      "212   男      4      26    19   43\n",
      "214   男      4      84    66   64\n",
      "238   男      4      51    91   37\n",
      "262   男      4     109    47   70\n",
      "270   男      4      50    20  100\n",
      "271   男      4      41   122    5\n",
      "284   男      4      66   130   89\n",
      "('男', 5)\n",
      "    sex  class  Python  Math   En\n",
      "1     男      5     116    88  133\n",
      "14    男      5       9    83  106\n",
      "20    男      5      49    40   10\n",
      "43    男      5     122    37   21\n",
      "93    男      5      21   131  107\n",
      "96    男      5      65    90  135\n",
      "108   男      5      30    65   70\n",
      "109   男      5      92    79   31\n",
      "111   男      5      11    61  106\n",
      "113   男      5     145   109   43\n",
      "143   男      5       2     9  147\n",
      "146   男      5      46   102    0\n",
      "173   男      5     130    33   45\n",
      "191   男      5     107     9  144\n",
      "196   男      5     128    30   46\n",
      "225   男      5      49   110   14\n",
      "274   男      5       2     7   17\n",
      "292   男      5     137   124   40\n",
      "294   男      5       1   115    5\n",
      "('男', 6)\n",
      "    sex  class  Python  Math   En\n",
      "11    男      6     131   102   60\n",
      "27    男      6      56     3    4\n",
      "28    男      6      53   109  147\n",
      "56    男      6      39    87    3\n",
      "118   男      6     134    72   76\n",
      "119   男      6      32   101    4\n",
      "141   男      6       1    39   71\n",
      "160   男      6      38    23  105\n",
      "163   男      6      16   109   46\n",
      "220   男      6     135    42  111\n",
      "232   男      6      32   138   70\n",
      "234   男      6      67    49    0\n",
      "235   男      6      59   139   55\n",
      "242   男      6      94    84  119\n",
      "('男', 7)\n",
      "    sex  class  Python  Math   En\n",
      "42    男      7      73    75  145\n",
      "52    男      7      54   115    7\n",
      "64    男      7     143    75  111\n",
      "72    男      7     106    13   36\n",
      "73    男      7      47    89   23\n",
      "82    男      7      87   123  135\n",
      "90    男      7      89    69    4\n",
      "99    男      7      10   103  114\n",
      "125   男      7     134    18   97\n",
      "134   男      7      80   113   83\n",
      "147   男      7      52   104   13\n",
      "152   男      7     126    52  138\n",
      "154   男      7      97   119  109\n",
      "184   男      7       0    14   94\n",
      "237   男      7      45    38   64\n",
      "243   男      7      62    13   74\n",
      "269   男      7      12    63  134\n",
      "298   男      7      93    31   61\n",
      "('男', 8)\n",
      "    sex  class  Python  Math   En\n",
      "24    男      8      89    42   47\n",
      "25    男      8      31    20   28\n",
      "65    男      8       9    37   85\n",
      "159   男      8      93    54   44\n",
      "170   男      8      89     8   66\n",
      "179   男      8      73     6   23\n",
      "181   男      8     118    54   12\n",
      "198   男      8      44    43   57\n",
      "209   男      8      57   121    9\n",
      "227   男      8      50    30   15\n",
      "233   男      8       9    44   51\n",
      "253   男      8       1    49  125\n",
      "261   男      8      98    78   50\n",
      "293   男      8     104    67  113\n"
     ]
    }
   ],
   "source": [
    "# 多分组\n",
    "for name ,group in df.groupby(by = ['sex','class']): # sex 2,class 8: 16组\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 176,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "g = df.groupby(by = 'sex')[['Math','En']] # 分组取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "m = {'sex':'category','class':'category','Python':'IT','Keras':'IT','Tensorflow':'IT','Java':'IT','C++':'IT'}\n",
    "for name,data in df.groupby(m,axis = 0):\n",
    "    print('组名',name)\n",
    "    print('数据',data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女\n",
      "    sex  class  Python  Math   En\n",
      "0     女      4       1    86  135\n",
      "4     女      1      33    40   41\n",
      "6     女      1     145    94   56\n",
      "7     女      3      87   109  134\n",
      "8     女      5      86    57    4\n",
      "..   ..    ...     ...   ...  ...\n",
      "290   女      1      52     2   64\n",
      "291   女      4     138    99   75\n",
      "295   女      3      86    94   45\n",
      "296   女      7     135    81   91\n",
      "297   女      2     150     0   56\n",
      "\n",
      "[151 rows x 5 columns]\n",
      "男\n",
      "    sex  class  Python  Math   En\n",
      "1     男      5     116    88  133\n",
      "2     男      1      27     1   70\n",
      "3     男      1     128    11   63\n",
      "5     男      1      65   139  112\n",
      "9     男      3      10    48   20\n",
      "..   ..    ...     ...   ...  ...\n",
      "292   男      5     137   124   40\n",
      "293   男      8     104    67  113\n",
      "294   男      5       1   115    5\n",
      "298   男      7      93    31   61\n",
      "299   男      1      61    86   79\n",
      "\n",
      "[149 rows x 5 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in g:\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 179,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('女', 1)\n",
      "4       40\n",
      "6       94\n",
      "44       3\n",
      "46     144\n",
      "74      92\n",
      "76      49\n",
      "91      21\n",
      "120     78\n",
      "142      5\n",
      "158    150\n",
      "161    119\n",
      "165    143\n",
      "166     20\n",
      "175    129\n",
      "197      8\n",
      "200     79\n",
      "202     18\n",
      "213    132\n",
      "245    131\n",
      "255     74\n",
      "260     11\n",
      "266     28\n",
      "290      2\n",
      "Name: Math, dtype: int64\n",
      "('女', 2)\n",
      "19      51\n",
      "21      30\n",
      "36     129\n",
      "40      16\n",
      "41     133\n",
      "48      66\n",
      "50      60\n",
      "70     112\n",
      "75     108\n",
      "84      75\n",
      "89      92\n",
      "94      22\n",
      "100    130\n",
      "101     14\n",
      "114     80\n",
      "115    113\n",
      "144    124\n",
      "204    143\n",
      "244    114\n",
      "259     19\n",
      "268    102\n",
      "276    110\n",
      "281    131\n",
      "297      0\n",
      "Name: Math, dtype: int64\n",
      "('女', 3)\n",
      "7      109\n",
      "15     138\n",
      "34      95\n",
      "107    136\n",
      "110     94\n",
      "122    112\n",
      "131    105\n",
      "155    148\n",
      "185    119\n",
      "192     17\n",
      "231     78\n",
      "251    113\n",
      "295     94\n",
      "Name: Math, dtype: int64\n",
      "('女', 4)\n",
      "0       86\n",
      "37      25\n",
      "67      14\n",
      "77      83\n",
      "80      22\n",
      "162     18\n",
      "168     60\n",
      "215     52\n",
      "217    149\n",
      "221     42\n",
      "226    148\n",
      "247      5\n",
      "278    148\n",
      "282     83\n",
      "291     99\n",
      "Name: Math, dtype: int64\n",
      "('女', 5)\n",
      "8       57\n",
      "18      27\n",
      "23      93\n",
      "61      21\n",
      "62      61\n",
      "85     108\n",
      "95      41\n",
      "112     48\n",
      "117     14\n",
      "124     63\n",
      "206    101\n",
      "239     41\n",
      "241    124\n",
      "256    122\n",
      "263     94\n",
      "287     20\n",
      "288     77\n",
      "Name: Math, dtype: int64\n",
      "('女', 6)\n",
      "22      43\n",
      "29      45\n",
      "38     123\n",
      "47      11\n",
      "49      33\n",
      "53      85\n",
      "69     131\n",
      "83     136\n",
      "88       3\n",
      "129     36\n",
      "138     33\n",
      "171     28\n",
      "183    147\n",
      "187    126\n",
      "195    130\n",
      "207    141\n",
      "224     64\n",
      "236     60\n",
      "248     93\n",
      "249     29\n",
      "250     14\n",
      "258     98\n",
      "Name: Math, dtype: int64\n",
      "('女', 7)\n",
      "13     149\n",
      "35      61\n",
      "51     129\n",
      "59      89\n",
      "60      78\n",
      "68     134\n",
      "81      66\n",
      "98     106\n",
      "116     36\n",
      "133     47\n",
      "145     52\n",
      "149     32\n",
      "169     95\n",
      "188      4\n",
      "201    150\n",
      "205    119\n",
      "222    119\n",
      "240     79\n",
      "273     68\n",
      "286     96\n",
      "296     81\n",
      "Name: Math, dtype: int64\n",
      "('女', 8)\n",
      "45      84\n",
      "57      88\n",
      "66     107\n",
      "78      10\n",
      "87      78\n",
      "103      5\n",
      "106     53\n",
      "123    143\n",
      "127    117\n",
      "137    113\n",
      "140     26\n",
      "164     66\n",
      "178     40\n",
      "182     44\n",
      "246      0\n",
      "275     10\n",
      "Name: Math, dtype: int64\n",
      "('男', 1)\n",
      "2        1\n",
      "3       11\n",
      "5      139\n",
      "12      74\n",
      "16       2\n",
      "30      87\n",
      "71      82\n",
      "92      64\n",
      "97      53\n",
      "104     10\n",
      "126     50\n",
      "135    104\n",
      "136     41\n",
      "156    105\n",
      "174     10\n",
      "189    109\n",
      "193    138\n",
      "199    134\n",
      "211    149\n",
      "216     96\n",
      "228    141\n",
      "229    147\n",
      "252     98\n",
      "254    125\n",
      "283     41\n",
      "285     78\n",
      "289    109\n",
      "299     86\n",
      "Name: Math, dtype: int64\n",
      "('男', 2)\n",
      "17      70\n",
      "26       6\n",
      "32      93\n",
      "33     138\n",
      "54      26\n",
      "79     128\n",
      "102     20\n",
      "132    150\n",
      "151     75\n",
      "157    109\n",
      "180     17\n",
      "190    122\n",
      "194     91\n",
      "219     91\n",
      "257     92\n",
      "277    119\n",
      "279     32\n",
      "Name: Math, dtype: int64\n",
      "('男', 3)\n",
      "9       48\n",
      "31      89\n",
      "39       3\n",
      "58      47\n",
      "121     93\n",
      "128     93\n",
      "167     24\n",
      "176     19\n",
      "186     80\n",
      "208     80\n",
      "218    121\n",
      "223     32\n",
      "230     50\n",
      "264     80\n",
      "265     17\n",
      "267    128\n",
      "272     78\n",
      "280     26\n",
      "Name: Math, dtype: int64\n",
      "('男', 4)\n",
      "10      77\n",
      "55      30\n",
      "63       0\n",
      "86      13\n",
      "105     10\n",
      "130    105\n",
      "139    110\n",
      "148    135\n",
      "150     36\n",
      "153    116\n",
      "172     21\n",
      "177     37\n",
      "203     41\n",
      "210     59\n",
      "212     19\n",
      "214     66\n",
      "238     91\n",
      "262     47\n",
      "270     20\n",
      "271    122\n",
      "284    130\n",
      "Name: Math, dtype: int64\n",
      "('男', 5)\n",
      "1       88\n",
      "14      83\n",
      "20      40\n",
      "43      37\n",
      "93     131\n",
      "96      90\n",
      "108     65\n",
      "109     79\n",
      "111     61\n",
      "113    109\n",
      "143      9\n",
      "146    102\n",
      "173     33\n",
      "191      9\n",
      "196     30\n",
      "225    110\n",
      "274      7\n",
      "292    124\n",
      "294    115\n",
      "Name: Math, dtype: int64\n",
      "('男', 6)\n",
      "11     102\n",
      "27       3\n",
      "28     109\n",
      "56      87\n",
      "118     72\n",
      "119    101\n",
      "141     39\n",
      "160     23\n",
      "163    109\n",
      "220     42\n",
      "232    138\n",
      "234     49\n",
      "235    139\n",
      "242     84\n",
      "Name: Math, dtype: int64\n",
      "('男', 7)\n",
      "42      75\n",
      "52     115\n",
      "64      75\n",
      "72      13\n",
      "73      89\n",
      "82     123\n",
      "90      69\n",
      "99     103\n",
      "125     18\n",
      "134    113\n",
      "147    104\n",
      "152     52\n",
      "154    119\n",
      "184     14\n",
      "237     38\n",
      "243     13\n",
      "269     63\n",
      "298     31\n",
      "Name: Math, dtype: int64\n",
      "('男', 8)\n",
      "24      42\n",
      "25      20\n",
      "65      37\n",
      "159     54\n",
      "170      8\n",
      "179      6\n",
      "181     54\n",
      "198     43\n",
      "209    121\n",
      "227     30\n",
      "233     44\n",
      "253     49\n",
      "261     78\n",
      "293     67\n",
      "Name: Math, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "for name ,group in df['Math'].groupby([df['sex'],df['class']]):\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女\n",
      "     Math  Python\n",
      "0      86       1\n",
      "4      40      33\n",
      "6      94     145\n",
      "7     109      87\n",
      "8      57      86\n",
      "..    ...     ...\n",
      "290     2      52\n",
      "291    99     138\n",
      "295    94      86\n",
      "296    81     135\n",
      "297     0     150\n",
      "\n",
      "[151 rows x 2 columns]\n",
      "男\n",
      "     Math  Python\n",
      "1      88     116\n",
      "2       1      27\n",
      "3      11     128\n",
      "5     139      65\n",
      "9      48      10\n",
      "..    ...     ...\n",
      "292   124     137\n",
      "293    67     104\n",
      "294   115       1\n",
      "298    31      93\n",
      "299    86      61\n",
      "\n",
      "[149 rows x 2 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df[['Math','Python']].groupby(df['sex']):\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 181,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "int64\n",
      "     class  Python  Math   En\n",
      "0        4       1    86  135\n",
      "1        5     116    88  133\n",
      "2        1      27     1   70\n",
      "3        1     128    11   63\n",
      "4        1      33    40   41\n",
      "..     ...     ...   ...  ...\n",
      "295      3      86    94   45\n",
      "296      7     135    81   91\n",
      "297      2     150     0   56\n",
      "298      7      93    31   61\n",
      "299      1      61    86   79\n",
      "\n",
      "[300 rows x 4 columns]\n",
      "object\n",
      "    sex\n",
      "0     女\n",
      "1     男\n",
      "2     男\n",
      "3     男\n",
      "4     女\n",
      "..   ..\n",
      "295   女\n",
      "296   女\n",
      "297   女\n",
      "298   男\n",
      "299   男\n",
      "\n",
      "[300 rows x 1 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df.groupby(df.dtypes,axis = 1):\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>女</td>\n",
       "      <td>3</td>\n",
       "      <td>90</td>\n",
       "      <td>80</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>男</td>\n",
       "      <td>7</td>\n",
       "      <td>83</td>\n",
       "      <td>44</td>\n",
       "      <td>139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>男</td>\n",
       "      <td>1</td>\n",
       "      <td>115</td>\n",
       "      <td>85</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>男</td>\n",
       "      <td>4</td>\n",
       "      <td>106</td>\n",
       "      <td>99</td>\n",
       "      <td>63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>男</td>\n",
       "      <td>8</td>\n",
       "      <td>114</td>\n",
       "      <td>133</td>\n",
       "      <td>93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>295</th>\n",
       "      <td>男</td>\n",
       "      <td>7</td>\n",
       "      <td>149</td>\n",
       "      <td>125</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>女</td>\n",
       "      <td>8</td>\n",
       "      <td>111</td>\n",
       "      <td>89</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>男</td>\n",
       "      <td>4</td>\n",
       "      <td>23</td>\n",
       "      <td>47</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>女</td>\n",
       "      <td>4</td>\n",
       "      <td>44</td>\n",
       "      <td>36</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299</th>\n",
       "      <td>男</td>\n",
       "      <td>7</td>\n",
       "      <td>122</td>\n",
       "      <td>133</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>300 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    sex  class  Python  Math   En\n",
       "0     女      3      90    80   68\n",
       "1     男      7      83    44  139\n",
       "2     男      1     115    85   65\n",
       "3     男      4     106    99   63\n",
       "4     男      8     114   133   93\n",
       "..   ..    ...     ...   ...  ...\n",
       "295   男      7     149   125   21\n",
       "296   女      8     111    89    0\n",
       "297   男      4      23    47   59\n",
       "298   女      4      44    36   17\n",
       "299   男      7     122   133   70\n",
       "\n",
       "[300 rows x 5 columns]"
      ]
     },
     "execution_count": 182,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = {'sex':np.random.randint(0,2,size = 300),\n",
    "                          'class':np.random.randint(1,9,size = 300),\n",
    "                          'Python':np.random.randint(0,151,size = 300),\n",
    "                          'Math':np.random.randint(0,151,size = 300),\n",
    "                          'En':np.random.randint(0,151,size = 300)})\n",
    "df['sex'] = df['sex'].map({0:'男',1:'女'})\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 183,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女\n",
      "    sex  class  Python  Math   En\n",
      "0     女      3      90    80   68\n",
      "8     女      2      26    60   65\n",
      "9     女      3     126    30   98\n",
      "12    女      4       0    41   50\n",
      "13    女      4     107    58   82\n",
      "..   ..    ...     ...   ...  ...\n",
      "286   女      2      80    35  131\n",
      "292   女      8      74   101   73\n",
      "293   女      5      36    45   44\n",
      "296   女      8     111    89    0\n",
      "298   女      4      44    36   17\n",
      "\n",
      "[162 rows x 5 columns]\n",
      "男\n",
      "    sex  class  Python  Math   En\n",
      "1     男      7      83    44  139\n",
      "2     男      1     115    85   65\n",
      "3     男      4     106    99   63\n",
      "4     男      8     114   133   93\n",
      "5     男      4       6   118  108\n",
      "..   ..    ...     ...   ...  ...\n",
      "291   男      8     104     9   82\n",
      "294   男      4       4   110  117\n",
      "295   男      7     149   125   21\n",
      "297   男      4      23    47   59\n",
      "299   男      7     122   133   70\n",
      "\n",
      "[138 rows x 5 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df.groupby(by = 'sex'): # 单分组\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 184,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('女', 1)\n",
      "    sex  class  Python  Math   En\n",
      "32    女      1     104     1  117\n",
      "82    女      1      48   130   79\n",
      "90    女      1     144   143   98\n",
      "93    女      1      70   116   68\n",
      "98    女      1     140   108    7\n",
      "104   女      1      66   106   67\n",
      "106   女      1       7    28    2\n",
      "110   女      1     113    42   77\n",
      "123   女      1     144   109   40\n",
      "159   女      1      27    22   70\n",
      "161   女      1      89    65  143\n",
      "188   女      1      37   149   68\n",
      "234   女      1      33    43  103\n",
      "250   女      1     115   124   35\n",
      "274   女      1      18    24   26\n",
      "('女', 2)\n",
      "    sex  class  Python  Math   En\n",
      "8     女      2      26    60   65\n",
      "16    女      2     147   117   44\n",
      "27    女      2     108     3    9\n",
      "30    女      2      78   132   15\n",
      "45    女      2       9    89   89\n",
      "51    女      2      68    70   25\n",
      "55    女      2      33    92   40\n",
      "84    女      2      99   123   31\n",
      "101   女      2      68    92  148\n",
      "118   女      2      86    55   48\n",
      "131   女      2      23     0  123\n",
      "134   女      2      25    37    9\n",
      "151   女      2      20    49    7\n",
      "199   女      2      25    83  133\n",
      "209   女      2       6     9   28\n",
      "217   女      2      89   135   10\n",
      "220   女      2      21     5   86\n",
      "245   女      2      65   102  103\n",
      "257   女      2     121   107   51\n",
      "261   女      2     139   125   61\n",
      "286   女      2      80    35  131\n",
      "('女', 3)\n",
      "    sex  class  Python  Math   En\n",
      "0     女      3      90    80   68\n",
      "9     女      3     126    30   98\n",
      "40    女      3      90   136   39\n",
      "63    女      3     121   112  118\n",
      "65    女      3      62    91    7\n",
      "100   女      3      98   141   40\n",
      "116   女      3      63    72   28\n",
      "122   女      3     104   135   95\n",
      "126   女      3      89    55   38\n",
      "157   女      3       9   119   57\n",
      "163   女      3     108   132  104\n",
      "165   女      3      72   146   82\n",
      "172   女      3      82     1  103\n",
      "174   女      3      24    36  141\n",
      "176   女      3      20    42   74\n",
      "192   女      3      65   136   56\n",
      "206   女      3     131    17   17\n",
      "212   女      3      82    62   97\n",
      "226   女      3     116    71   71\n",
      "242   女      3     110   136   63\n",
      "251   女      3      46   105  102\n",
      "254   女      3     110    31  101\n",
      "('女', 4)\n",
      "    sex  class  Python  Math   En\n",
      "12    女      4       0    41   50\n",
      "13    女      4     107    58   82\n",
      "18    女      4     125    56  123\n",
      "20    女      4      95    43   65\n",
      "42    女      4     117    17   12\n",
      "47    女      4      38    86   50\n",
      "79    女      4       0    28   92\n",
      "99    女      4      38   131   34\n",
      "108   女      4     135   122   87\n",
      "115   女      4     147   101   95\n",
      "119   女      4      58    76   90\n",
      "127   女      4      91    79   98\n",
      "149   女      4      73    93   80\n",
      "158   女      4      79   138  122\n",
      "186   女      4      18    88   99\n",
      "200   女      4      64    12    2\n",
      "231   女      4     127   107  127\n",
      "253   女      4      22    19   10\n",
      "271   女      4      36     2   60\n",
      "298   女      4      44    36   17\n",
      "('女', 5)\n",
      "    sex  class  Python  Math   En\n",
      "36    女      5     136   147   71\n",
      "80    女      5      27   102   70\n",
      "148   女      5      81    23  108\n",
      "169   女      5      89    20  126\n",
      "178   女      5     116    51   82\n",
      "179   女      5     121   134   29\n",
      "181   女      5     111     1    1\n",
      "197   女      5      13    94   30\n",
      "216   女      5      80   120   94\n",
      "223   女      5     126   125  124\n",
      "238   女      5      46   118   88\n",
      "244   女      5      54   115  129\n",
      "264   女      5     116    81   14\n",
      "266   女      5       1    74   48\n",
      "272   女      5     103    48   88\n",
      "284   女      5      90    75   77\n",
      "293   女      5      36    45   44\n",
      "('女', 6)\n",
      "    sex  class  Python  Math   En\n",
      "15    女      6      10   129   34\n",
      "21    女      6      17    97   53\n",
      "37    女      6      45   140   86\n",
      "49    女      6      12    62    7\n",
      "62    女      6      20    33   25\n",
      "105   女      6      41    26    6\n",
      "109   女      6      46     2    5\n",
      "120   女      6      11    11    9\n",
      "162   女      6      69    64  100\n",
      "183   女      6      69   121  147\n",
      "187   女      6      55   146   96\n",
      "189   女      6      82    97    5\n",
      "194   女      6     118     7   72\n",
      "201   女      6      19   112   23\n",
      "203   女      6     148    27   40\n",
      "219   女      6       2    87   57\n",
      "222   女      6      84   124   74\n",
      "228   女      6      33    95   73\n",
      "248   女      6     149     5   77\n",
      "268   女      6     126    32   99\n",
      "278   女      6      81    83  118\n",
      "('女', 7)\n",
      "    sex  class  Python  Math   En\n",
      "25    女      7     104    82   24\n",
      "26    女      7     136    29   54\n",
      "56    女      7      38    49   88\n",
      "64    女      7       2    52   53\n",
      "92    女      7      69   132   22\n",
      "107   女      7      48   108  146\n",
      "121   女      7      21    11  141\n",
      "128   女      7       3     4  143\n",
      "129   女      7      85   129   37\n",
      "137   女      7      14    87   84\n",
      "138   女      7      71    53    4\n",
      "143   女      7      82    83   14\n",
      "146   女      7      40   109   38\n",
      "153   女      7     109    34  144\n",
      "171   女      7      13    30   69\n",
      "175   女      7      67    86   71\n",
      "182   女      7      16   130   67\n",
      "191   女      7      42    34  144\n",
      "205   女      7     128    28   63\n",
      "249   女      7     131    11  106\n",
      "267   女      7     101     4  113\n",
      "281   女      7     121   121  146\n",
      "285   女      7      59   148   22\n",
      "('女', 8)\n",
      "    sex  class  Python  Math   En\n",
      "28    女      8      24   129   60\n",
      "75    女      8       8   106   53\n",
      "87    女      8       0     3   78\n",
      "103   女      8     125   113  119\n",
      "117   女      8      96   103   27\n",
      "124   女      8     135    90  144\n",
      "125   女      8     105    81   12\n",
      "135   女      8     113   129  131\n",
      "140   女      8     137   124   94\n",
      "150   女      8      29    77   42\n",
      "154   女      8      49    26    1\n",
      "168   女      8     111   142   93\n",
      "180   女      8     106    21   69\n",
      "190   女      8      67    22  122\n",
      "230   女      8      64    78  126\n",
      "236   女      8      65   116   14\n",
      "237   女      8      12    54  138\n",
      "256   女      8     123    60   32\n",
      "259   女      8      35     4  146\n",
      "277   女      8      23   141   76\n",
      "279   女      8     145   137   44\n",
      "292   女      8      74   101   73\n",
      "296   女      8     111    89    0\n",
      "('男', 1)\n",
      "    sex  class  Python  Math   En\n",
      "2     男      1     115    85   65\n",
      "10    男      1      35    85  118\n",
      "29    男      1       1    12   66\n",
      "48    男      1       3   111  106\n",
      "67    男      1      71   134  124\n",
      "77    男      1     123   142   35\n",
      "83    男      1      77    10  114\n",
      "85    男      1     128    34   98\n",
      "88    男      1      56     2   79\n",
      "130   男      1     107    48  130\n",
      "170   男      1     142    96   70\n",
      "195   男      1     141    99   83\n",
      "225   男      1      67   111  100\n",
      "262   男      1       3    51   83\n",
      "275   男      1      62   130   31\n",
      "288   男      1      34   105   11\n",
      "('男', 2)\n",
      "    sex  class  Python  Math   En\n",
      "14    男      2      18   101    4\n",
      "19    男      2      51    23   92\n",
      "35    男      2      84    45   13\n",
      "39    男      2      12   138   70\n",
      "53    男      2      44    15    3\n",
      "61    男      2      27     0  131\n",
      "66    男      2      39   116   31\n",
      "97    男      2      29   131   28\n",
      "102   男      2      65    91  125\n",
      "141   男      2      13    71  125\n",
      "142   男      2      46   121   15\n",
      "184   男      2     114    11   97\n",
      "185   男      2      80    57  145\n",
      "196   男      2      55   118   65\n",
      "227   男      2      48     1  100\n",
      "258   男      2      38    28   39\n",
      "263   男      2       6    79   67\n",
      "270   男      2      67    73  112\n",
      "('男', 3)\n",
      "    sex  class  Python  Math   En\n",
      "6     男      3      58   137   24\n",
      "7     男      3      87     1   91\n",
      "22    男      3      17    80   65\n",
      "24    男      3       2    84   43\n",
      "33    男      3      95   124  113\n",
      "44    男      3      82    28   29\n",
      "78    男      3     108    27   82\n",
      "81    男      3     113    84   23\n",
      "133   男      3     128    53   24\n",
      "152   男      3      71    39   44\n",
      "167   男      3     126     0   26\n",
      "207   男      3     108    16   96\n",
      "214   男      3      94    31   44\n",
      "255   男      3      10   128   17\n",
      "260   男      3       8    94  109\n",
      "('男', 4)\n",
      "    sex  class  Python  Math   En\n",
      "3     男      4     106    99   63\n",
      "5     男      4       6   118  108\n",
      "38    男      4     119    55  136\n",
      "41    男      4      96   144   85\n",
      "50    男      4      92     3   96\n",
      "54    男      4      36    29    8\n",
      "59    男      4      45   105   97\n",
      "69    男      4      19    17   66\n",
      "71    男      4     117    17   98\n",
      "91    男      4      28    29  130\n",
      "112   男      4      55     2  137\n",
      "114   男      4      73   125   64\n",
      "136   男      4      75    32  119\n",
      "156   男      4      53    94   32\n",
      "208   男      4      98    85  132\n",
      "211   男      4      78   148    2\n",
      "224   男      4      93   110   85\n",
      "233   男      4      41    21  121\n",
      "235   男      4     144     8  119\n",
      "243   男      4      84   148   32\n",
      "294   男      4       4   110  117\n",
      "297   男      4      23    47   59\n",
      "('男', 5)\n",
      "    sex  class  Python  Math   En\n",
      "11    男      5      84    61   48\n",
      "23    男      5     100   134   45\n",
      "31    男      5      43    94   71\n",
      "70    男      5     135    75   21\n",
      "74    男      5      28    19  106\n",
      "160   男      5      93    15  142\n",
      "204   男      5      83    25   38\n",
      "210   男      5      13    79  104\n",
      "218   男      5     111   113  125\n",
      "221   男      5      67   133  120\n",
      "229   男      5     136    50   23\n",
      "232   男      5     118    68  134\n",
      "241   男      5     129   135   80\n",
      "247   男      5      42    36   19\n",
      "273   男      5      43    73  125\n",
      "276   男      5     138    81   56\n",
      "282   男      5     136   120   75\n",
      "('男', 6)\n",
      "    sex  class  Python  Math   En\n",
      "46    男      6       3    16  141\n",
      "60    男      6      79   144  144\n",
      "89    男      6     146     1   69\n",
      "132   男      6      58    79   97\n",
      "147   男      6     130     3  120\n",
      "166   男      6     111    11   40\n",
      "213   男      6     108    19  146\n",
      "215   男      6      42    45  115\n",
      "252   男      6     116     7   82\n",
      "280   男      6      20   134  150\n",
      "289   男      6      72    81   73\n",
      "('男', 7)\n",
      "    sex  class  Python  Math   En\n",
      "1     男      7      83    44  139\n",
      "17    男      7      73   135   46\n",
      "34    男      7     133    91   14\n",
      "43    男      7      53   123  144\n",
      "52    男      7      59   133   29\n",
      "57    男      7     135   112   99\n",
      "76    男      7      78    46  121\n",
      "86    男      7      26    35   82\n",
      "94    男      7     113     1  134\n",
      "95    男      7     128    41  134\n",
      "96    男      7      50   121  124\n",
      "144   男      7      66    52   28\n",
      "155   男      7      38    17  116\n",
      "173   男      7      20   117   56\n",
      "202   男      7     125   128   17\n",
      "239   男      7      30    10   12\n",
      "240   男      7      75    54   95\n",
      "265   男      7     122    27   72\n",
      "269   男      7     146    83  125\n",
      "283   男      7      20    45  120\n",
      "287   男      7     119    36  136\n",
      "295   男      7     149   125   21\n",
      "299   男      7     122   133   70\n",
      "('男', 8)\n",
      "    sex  class  Python  Math   En\n",
      "4     男      8     114   133   93\n",
      "58    男      8      22     3   97\n",
      "68    男      8      57   129   89\n",
      "72    男      8     104     2  135\n",
      "73    男      8      20   132  127\n",
      "111   男      8     148   146  120\n",
      "113   男      8      75   125   49\n",
      "139   男      8     118   124   31\n",
      "145   男      8     121    18   75\n",
      "164   男      8      75   112  144\n",
      "177   男      8      56    68  121\n",
      "193   男      8      55   105  101\n",
      "198   男      8     120    43  111\n",
      "246   男      8     147   132  138\n",
      "290   男      8      61    45   37\n",
      "291   男      8     104     9   82\n"
     ]
    }
   ],
   "source": [
    "for name,group in df.groupby(by = ['sex','class']): # 多分组，性别2，class 8 = 16\n",
    "    print(name)\n",
    "    print(group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 185,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "女      Python  Math\n",
      "0        90    80\n",
      "8        26    60\n",
      "9       126    30\n",
      "12        0    41\n",
      "13      107    58\n",
      "..      ...   ...\n",
      "286      80    35\n",
      "292      74   101\n",
      "293      36    45\n",
      "296     111    89\n",
      "298      44    36\n",
      "\n",
      "[162 rows x 2 columns]\n",
      "男      Python  Math\n",
      "1        83    44\n",
      "2       115    85\n",
      "3       106    99\n",
      "4       114   133\n",
      "5         6   118\n",
      "..      ...   ...\n",
      "291     104     9\n",
      "294       4   110\n",
      "295     149   125\n",
      "297      23    47\n",
      "299     122   133\n",
      "\n",
      "[138 rows x 2 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df[['Python','Math']].groupby(df['sex']):\n",
    "    print(name,group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 186,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('女', 1)      Python  Math\n",
      "32      104     1\n",
      "82       48   130\n",
      "90      144   143\n",
      "93       70   116\n",
      "98      140   108\n",
      "104      66   106\n",
      "106       7    28\n",
      "110     113    42\n",
      "123     144   109\n",
      "159      27    22\n",
      "161      89    65\n",
      "188      37   149\n",
      "234      33    43\n",
      "250     115   124\n",
      "274      18    24\n",
      "('女', 2)      Python  Math\n",
      "8        26    60\n",
      "16      147   117\n",
      "27      108     3\n",
      "30       78   132\n",
      "45        9    89\n",
      "51       68    70\n",
      "55       33    92\n",
      "84       99   123\n",
      "101      68    92\n",
      "118      86    55\n",
      "131      23     0\n",
      "134      25    37\n",
      "151      20    49\n",
      "199      25    83\n",
      "209       6     9\n",
      "217      89   135\n",
      "220      21     5\n",
      "245      65   102\n",
      "257     121   107\n",
      "261     139   125\n",
      "286      80    35\n",
      "('女', 3)      Python  Math\n",
      "0        90    80\n",
      "9       126    30\n",
      "40       90   136\n",
      "63      121   112\n",
      "65       62    91\n",
      "100      98   141\n",
      "116      63    72\n",
      "122     104   135\n",
      "126      89    55\n",
      "157       9   119\n",
      "163     108   132\n",
      "165      72   146\n",
      "172      82     1\n",
      "174      24    36\n",
      "176      20    42\n",
      "192      65   136\n",
      "206     131    17\n",
      "212      82    62\n",
      "226     116    71\n",
      "242     110   136\n",
      "251      46   105\n",
      "254     110    31\n",
      "('女', 4)      Python  Math\n",
      "12        0    41\n",
      "13      107    58\n",
      "18      125    56\n",
      "20       95    43\n",
      "42      117    17\n",
      "47       38    86\n",
      "79        0    28\n",
      "99       38   131\n",
      "108     135   122\n",
      "115     147   101\n",
      "119      58    76\n",
      "127      91    79\n",
      "149      73    93\n",
      "158      79   138\n",
      "186      18    88\n",
      "200      64    12\n",
      "231     127   107\n",
      "253      22    19\n",
      "271      36     2\n",
      "298      44    36\n",
      "('女', 5)      Python  Math\n",
      "36      136   147\n",
      "80       27   102\n",
      "148      81    23\n",
      "169      89    20\n",
      "178     116    51\n",
      "179     121   134\n",
      "181     111     1\n",
      "197      13    94\n",
      "216      80   120\n",
      "223     126   125\n",
      "238      46   118\n",
      "244      54   115\n",
      "264     116    81\n",
      "266       1    74\n",
      "272     103    48\n",
      "284      90    75\n",
      "293      36    45\n",
      "('女', 6)      Python  Math\n",
      "15       10   129\n",
      "21       17    97\n",
      "37       45   140\n",
      "49       12    62\n",
      "62       20    33\n",
      "105      41    26\n",
      "109      46     2\n",
      "120      11    11\n",
      "162      69    64\n",
      "183      69   121\n",
      "187      55   146\n",
      "189      82    97\n",
      "194     118     7\n",
      "201      19   112\n",
      "203     148    27\n",
      "219       2    87\n",
      "222      84   124\n",
      "228      33    95\n",
      "248     149     5\n",
      "268     126    32\n",
      "278      81    83\n",
      "('女', 7)      Python  Math\n",
      "25      104    82\n",
      "26      136    29\n",
      "56       38    49\n",
      "64        2    52\n",
      "92       69   132\n",
      "107      48   108\n",
      "121      21    11\n",
      "128       3     4\n",
      "129      85   129\n",
      "137      14    87\n",
      "138      71    53\n",
      "143      82    83\n",
      "146      40   109\n",
      "153     109    34\n",
      "171      13    30\n",
      "175      67    86\n",
      "182      16   130\n",
      "191      42    34\n",
      "205     128    28\n",
      "249     131    11\n",
      "267     101     4\n",
      "281     121   121\n",
      "285      59   148\n",
      "('女', 8)      Python  Math\n",
      "28       24   129\n",
      "75        8   106\n",
      "87        0     3\n",
      "103     125   113\n",
      "117      96   103\n",
      "124     135    90\n",
      "125     105    81\n",
      "135     113   129\n",
      "140     137   124\n",
      "150      29    77\n",
      "154      49    26\n",
      "168     111   142\n",
      "180     106    21\n",
      "190      67    22\n",
      "230      64    78\n",
      "236      65   116\n",
      "237      12    54\n",
      "256     123    60\n",
      "259      35     4\n",
      "277      23   141\n",
      "279     145   137\n",
      "292      74   101\n",
      "296     111    89\n",
      "('男', 1)      Python  Math\n",
      "2       115    85\n",
      "10       35    85\n",
      "29        1    12\n",
      "48        3   111\n",
      "67       71   134\n",
      "77      123   142\n",
      "83       77    10\n",
      "85      128    34\n",
      "88       56     2\n",
      "130     107    48\n",
      "170     142    96\n",
      "195     141    99\n",
      "225      67   111\n",
      "262       3    51\n",
      "275      62   130\n",
      "288      34   105\n",
      "('男', 2)      Python  Math\n",
      "14       18   101\n",
      "19       51    23\n",
      "35       84    45\n",
      "39       12   138\n",
      "53       44    15\n",
      "61       27     0\n",
      "66       39   116\n",
      "97       29   131\n",
      "102      65    91\n",
      "141      13    71\n",
      "142      46   121\n",
      "184     114    11\n",
      "185      80    57\n",
      "196      55   118\n",
      "227      48     1\n",
      "258      38    28\n",
      "263       6    79\n",
      "270      67    73\n",
      "('男', 3)      Python  Math\n",
      "6        58   137\n",
      "7        87     1\n",
      "22       17    80\n",
      "24        2    84\n",
      "33       95   124\n",
      "44       82    28\n",
      "78      108    27\n",
      "81      113    84\n",
      "133     128    53\n",
      "152      71    39\n",
      "167     126     0\n",
      "207     108    16\n",
      "214      94    31\n",
      "255      10   128\n",
      "260       8    94\n",
      "('男', 4)      Python  Math\n",
      "3       106    99\n",
      "5         6   118\n",
      "38      119    55\n",
      "41       96   144\n",
      "50       92     3\n",
      "54       36    29\n",
      "59       45   105\n",
      "69       19    17\n",
      "71      117    17\n",
      "91       28    29\n",
      "112      55     2\n",
      "114      73   125\n",
      "136      75    32\n",
      "156      53    94\n",
      "208      98    85\n",
      "211      78   148\n",
      "224      93   110\n",
      "233      41    21\n",
      "235     144     8\n",
      "243      84   148\n",
      "294       4   110\n",
      "297      23    47\n",
      "('男', 5)      Python  Math\n",
      "11       84    61\n",
      "23      100   134\n",
      "31       43    94\n",
      "70      135    75\n",
      "74       28    19\n",
      "160      93    15\n",
      "204      83    25\n",
      "210      13    79\n",
      "218     111   113\n",
      "221      67   133\n",
      "229     136    50\n",
      "232     118    68\n",
      "241     129   135\n",
      "247      42    36\n",
      "273      43    73\n",
      "276     138    81\n",
      "282     136   120\n",
      "('男', 6)      Python  Math\n",
      "46        3    16\n",
      "60       79   144\n",
      "89      146     1\n",
      "132      58    79\n",
      "147     130     3\n",
      "166     111    11\n",
      "213     108    19\n",
      "215      42    45\n",
      "252     116     7\n",
      "280      20   134\n",
      "289      72    81\n",
      "('男', 7)      Python  Math\n",
      "1        83    44\n",
      "17       73   135\n",
      "34      133    91\n",
      "43       53   123\n",
      "52       59   133\n",
      "57      135   112\n",
      "76       78    46\n",
      "86       26    35\n",
      "94      113     1\n",
      "95      128    41\n",
      "96       50   121\n",
      "144      66    52\n",
      "155      38    17\n",
      "173      20   117\n",
      "202     125   128\n",
      "239      30    10\n",
      "240      75    54\n",
      "265     122    27\n",
      "269     146    83\n",
      "283      20    45\n",
      "287     119    36\n",
      "295     149   125\n",
      "299     122   133\n",
      "('男', 8)      Python  Math\n",
      "4       114   133\n",
      "58       22     3\n",
      "68       57   129\n",
      "72      104     2\n",
      "73       20   132\n",
      "111     148   146\n",
      "113      75   125\n",
      "139     118   124\n",
      "145     121    18\n",
      "164      75   112\n",
      "177      56    68\n",
      "193      55   105\n",
      "198     120    43\n",
      "246     147   132\n",
      "290      61    45\n",
      "291     104     9\n"
     ]
    }
   ],
   "source": [
    "for name,group in df[['Python','Math']].groupby([df['sex'],df['class']]):\n",
    "    print(name,group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 187,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "int64      class  Python  Math   En\n",
      "0        3      90    80   68\n",
      "1        7      83    44  139\n",
      "2        1     115    85   65\n",
      "3        4     106    99   63\n",
      "4        8     114   133   93\n",
      "..     ...     ...   ...  ...\n",
      "295      7     149   125   21\n",
      "296      8     111    89    0\n",
      "297      4      23    47   59\n",
      "298      4      44    36   17\n",
      "299      7     122   133   70\n",
      "\n",
      "[300 rows x 4 columns]\n",
      "object     sex\n",
      "0     女\n",
      "1     男\n",
      "2     男\n",
      "3     男\n",
      "4     男\n",
      "..   ..\n",
      "295   男\n",
      "296   女\n",
      "297   男\n",
      "298   女\n",
      "299   男\n",
      "\n",
      "[300 rows x 1 columns]\n"
     ]
    }
   ],
   "source": [
    "for name,group in df.groupby(df.dtypes,axis = 1): #根据数据类型进行分组\n",
    "    print(name,group)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 188,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "category     sex  class\n",
      "0     女      3\n",
      "1     男      7\n",
      "2     男      1\n",
      "3     男      4\n",
      "4     男      8\n",
      "..   ..    ...\n",
      "295   男      7\n",
      "296   女      8\n",
      "297   男      4\n",
      "298   女      4\n",
      "299   男      7\n",
      "\n",
      "[300 rows x 2 columns]\n",
      "科目      Python  Math   En\n",
      "0        90    80   68\n",
      "1        83    44  139\n",
      "2       115    85   65\n",
      "3       106    99   63\n",
      "4       114   133   93\n",
      "..      ...   ...  ...\n",
      "295     149   125   21\n",
      "296     111    89    0\n",
      "297      23    47   59\n",
      "298      44    36   17\n",
      "299     122   133   70\n",
      "\n",
      "[300 rows x 3 columns]\n"
     ]
    }
   ],
   "source": [
    "m = {'sex':'category','class':'category','Python':'科目','Math':'科目','En':'科目'}\n",
    "for name,group in df.groupby(by = m,axis = 1):\n",
    "    print(name,group)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 分组聚合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 189,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>女</th>\n",
       "      <td>149</td>\n",
       "      <td>149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>男</th>\n",
       "      <td>149</td>\n",
       "      <td>148</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Python  Math\n",
       "sex              \n",
       "女       149   149\n",
       "男       149   148"
      ]
     },
     "execution_count": 189,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = 'sex')[['Python','Math']].max() # 数学Python根据性别分组，求解的最大值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>77.0</td>\n",
       "      <td>80.7</td>\n",
       "      <td>66.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>63.6</td>\n",
       "      <td>72.4</td>\n",
       "      <td>59.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>82.6</td>\n",
       "      <td>85.7</td>\n",
       "      <td>72.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>70.7</td>\n",
       "      <td>66.6</td>\n",
       "      <td>69.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>79.2</td>\n",
       "      <td>80.8</td>\n",
       "      <td>71.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>58.9</td>\n",
       "      <td>71.4</td>\n",
       "      <td>57.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>65.2</td>\n",
       "      <td>67.6</td>\n",
       "      <td>78.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.4</td>\n",
       "      <td>84.6</td>\n",
       "      <td>73.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>72.8</td>\n",
       "      <td>78.4</td>\n",
       "      <td>82.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>46.4</td>\n",
       "      <td>67.7</td>\n",
       "      <td>70.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>73.8</td>\n",
       "      <td>61.7</td>\n",
       "      <td>55.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>67.5</td>\n",
       "      <td>70.3</td>\n",
       "      <td>86.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>88.2</td>\n",
       "      <td>77.1</td>\n",
       "      <td>78.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.5</td>\n",
       "      <td>49.1</td>\n",
       "      <td>107.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>85.3</td>\n",
       "      <td>74.3</td>\n",
       "      <td>84.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>87.3</td>\n",
       "      <td>82.9</td>\n",
       "      <td>96.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Python  Math     En\n",
       "sex class                     \n",
       "女   1        77.0  80.7   66.7\n",
       "    2        63.6  72.4   59.8\n",
       "    3        82.6  85.7   72.7\n",
       "    4        70.7  66.6   69.8\n",
       "    5        79.2  80.8   71.9\n",
       "    6        58.9  71.4   57.4\n",
       "    7        65.2  67.6   78.0\n",
       "    8        76.4  84.6   73.7\n",
       "男   1        72.8  78.4   82.1\n",
       "    2        46.4  67.7   70.1\n",
       "    3        73.8  61.7   55.3\n",
       "    4        67.5  70.3   86.6\n",
       "    5        88.2  77.1   78.4\n",
       "    6        80.5  49.1  107.0\n",
       "    7        85.3  74.3   84.1\n",
       "    8        87.3  82.9   96.9"
      ]
     },
     "execution_count": 190,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).mean().round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 191,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "sex  class\n",
       "女    1        15\n",
       "     2        21\n",
       "     3        22\n",
       "     4        20\n",
       "     5        17\n",
       "     6        21\n",
       "     7        23\n",
       "     8        23\n",
       "男    1        16\n",
       "     2        18\n",
       "     3        15\n",
       "     4        22\n",
       "     5        17\n",
       "     6        11\n",
       "     7        23\n",
       "     8        16\n",
       "dtype: int64"
      ]
     },
     "execution_count": 191,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).size() # 统计各个班级男女人数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 192,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"8\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"5\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"8\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>...</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>15.0</td>\n",
       "      <td>77.0</td>\n",
       "      <td>47.8</td>\n",
       "      <td>7.0</td>\n",
       "      <td>35.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>114.0</td>\n",
       "      <td>144.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>80.7</td>\n",
       "      <td>...</td>\n",
       "      <td>120.0</td>\n",
       "      <td>149.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>66.7</td>\n",
       "      <td>39.7</td>\n",
       "      <td>2.0</td>\n",
       "      <td>37.5</td>\n",
       "      <td>68.0</td>\n",
       "      <td>88.5</td>\n",
       "      <td>143.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>21.0</td>\n",
       "      <td>63.6</td>\n",
       "      <td>43.5</td>\n",
       "      <td>6.0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>89.0</td>\n",
       "      <td>147.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>72.4</td>\n",
       "      <td>...</td>\n",
       "      <td>107.0</td>\n",
       "      <td>135.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>59.8</td>\n",
       "      <td>45.8</td>\n",
       "      <td>7.0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>48.0</td>\n",
       "      <td>89.0</td>\n",
       "      <td>148.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>22.0</td>\n",
       "      <td>82.6</td>\n",
       "      <td>34.6</td>\n",
       "      <td>9.0</td>\n",
       "      <td>63.5</td>\n",
       "      <td>89.5</td>\n",
       "      <td>109.5</td>\n",
       "      <td>131.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>85.7</td>\n",
       "      <td>...</td>\n",
       "      <td>134.2</td>\n",
       "      <td>146.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>72.7</td>\n",
       "      <td>34.9</td>\n",
       "      <td>7.0</td>\n",
       "      <td>44.0</td>\n",
       "      <td>72.5</td>\n",
       "      <td>100.2</td>\n",
       "      <td>141.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>20.0</td>\n",
       "      <td>70.7</td>\n",
       "      <td>45.9</td>\n",
       "      <td>0.0</td>\n",
       "      <td>37.5</td>\n",
       "      <td>68.5</td>\n",
       "      <td>109.5</td>\n",
       "      <td>147.0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>66.6</td>\n",
       "      <td>...</td>\n",
       "      <td>95.0</td>\n",
       "      <td>138.0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>69.8</td>\n",
       "      <td>39.1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>46.0</td>\n",
       "      <td>81.0</td>\n",
       "      <td>95.8</td>\n",
       "      <td>127.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>17.0</td>\n",
       "      <td>79.2</td>\n",
       "      <td>42.2</td>\n",
       "      <td>1.0</td>\n",
       "      <td>46.0</td>\n",
       "      <td>89.0</td>\n",
       "      <td>116.0</td>\n",
       "      <td>136.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>80.8</td>\n",
       "      <td>...</td>\n",
       "      <td>118.0</td>\n",
       "      <td>147.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>71.9</td>\n",
       "      <td>39.3</td>\n",
       "      <td>1.0</td>\n",
       "      <td>44.0</td>\n",
       "      <td>77.0</td>\n",
       "      <td>94.0</td>\n",
       "      <td>129.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>21.0</td>\n",
       "      <td>58.9</td>\n",
       "      <td>46.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>19.0</td>\n",
       "      <td>46.0</td>\n",
       "      <td>82.0</td>\n",
       "      <td>149.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>71.4</td>\n",
       "      <td>...</td>\n",
       "      <td>112.0</td>\n",
       "      <td>146.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>57.4</td>\n",
       "      <td>41.7</td>\n",
       "      <td>5.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>57.0</td>\n",
       "      <td>86.0</td>\n",
       "      <td>147.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>23.0</td>\n",
       "      <td>65.2</td>\n",
       "      <td>43.5</td>\n",
       "      <td>2.0</td>\n",
       "      <td>29.5</td>\n",
       "      <td>67.0</td>\n",
       "      <td>102.5</td>\n",
       "      <td>136.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>67.6</td>\n",
       "      <td>...</td>\n",
       "      <td>108.5</td>\n",
       "      <td>148.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>48.6</td>\n",
       "      <td>4.0</td>\n",
       "      <td>37.5</td>\n",
       "      <td>69.0</td>\n",
       "      <td>127.0</td>\n",
       "      <td>146.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>23.0</td>\n",
       "      <td>76.4</td>\n",
       "      <td>46.5</td>\n",
       "      <td>0.0</td>\n",
       "      <td>32.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>112.0</td>\n",
       "      <td>145.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>84.6</td>\n",
       "      <td>...</td>\n",
       "      <td>120.0</td>\n",
       "      <td>142.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>73.7</td>\n",
       "      <td>47.7</td>\n",
       "      <td>0.0</td>\n",
       "      <td>37.0</td>\n",
       "      <td>73.0</td>\n",
       "      <td>120.5</td>\n",
       "      <td>146.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>16.0</td>\n",
       "      <td>72.8</td>\n",
       "      <td>49.2</td>\n",
       "      <td>1.0</td>\n",
       "      <td>34.8</td>\n",
       "      <td>69.0</td>\n",
       "      <td>117.0</td>\n",
       "      <td>142.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>78.4</td>\n",
       "      <td>...</td>\n",
       "      <td>111.0</td>\n",
       "      <td>142.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>82.1</td>\n",
       "      <td>34.7</td>\n",
       "      <td>11.0</td>\n",
       "      <td>65.8</td>\n",
       "      <td>83.0</td>\n",
       "      <td>108.0</td>\n",
       "      <td>130.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>18.0</td>\n",
       "      <td>46.4</td>\n",
       "      <td>28.2</td>\n",
       "      <td>6.0</td>\n",
       "      <td>27.5</td>\n",
       "      <td>45.0</td>\n",
       "      <td>62.5</td>\n",
       "      <td>114.0</td>\n",
       "      <td>18.0</td>\n",
       "      <td>67.7</td>\n",
       "      <td>...</td>\n",
       "      <td>112.2</td>\n",
       "      <td>138.0</td>\n",
       "      <td>18.0</td>\n",
       "      <td>70.1</td>\n",
       "      <td>47.7</td>\n",
       "      <td>3.0</td>\n",
       "      <td>28.8</td>\n",
       "      <td>68.5</td>\n",
       "      <td>109.0</td>\n",
       "      <td>145.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>15.0</td>\n",
       "      <td>73.8</td>\n",
       "      <td>44.5</td>\n",
       "      <td>2.0</td>\n",
       "      <td>37.5</td>\n",
       "      <td>87.0</td>\n",
       "      <td>108.0</td>\n",
       "      <td>128.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>61.7</td>\n",
       "      <td>...</td>\n",
       "      <td>89.0</td>\n",
       "      <td>137.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>55.3</td>\n",
       "      <td>34.2</td>\n",
       "      <td>17.0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>44.0</td>\n",
       "      <td>86.5</td>\n",
       "      <td>113.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>22.0</td>\n",
       "      <td>67.5</td>\n",
       "      <td>39.1</td>\n",
       "      <td>4.0</td>\n",
       "      <td>37.2</td>\n",
       "      <td>74.0</td>\n",
       "      <td>95.2</td>\n",
       "      <td>144.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>70.3</td>\n",
       "      <td>...</td>\n",
       "      <td>110.0</td>\n",
       "      <td>148.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>86.6</td>\n",
       "      <td>41.1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>63.2</td>\n",
       "      <td>96.5</td>\n",
       "      <td>119.0</td>\n",
       "      <td>137.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>17.0</td>\n",
       "      <td>88.2</td>\n",
       "      <td>42.2</td>\n",
       "      <td>13.0</td>\n",
       "      <td>43.0</td>\n",
       "      <td>93.0</td>\n",
       "      <td>129.0</td>\n",
       "      <td>138.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>77.1</td>\n",
       "      <td>...</td>\n",
       "      <td>113.0</td>\n",
       "      <td>135.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>78.4</td>\n",
       "      <td>42.4</td>\n",
       "      <td>19.0</td>\n",
       "      <td>45.0</td>\n",
       "      <td>75.0</td>\n",
       "      <td>120.0</td>\n",
       "      <td>142.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>11.0</td>\n",
       "      <td>80.5</td>\n",
       "      <td>46.3</td>\n",
       "      <td>3.0</td>\n",
       "      <td>50.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>113.5</td>\n",
       "      <td>146.0</td>\n",
       "      <td>11.0</td>\n",
       "      <td>49.1</td>\n",
       "      <td>...</td>\n",
       "      <td>80.0</td>\n",
       "      <td>144.0</td>\n",
       "      <td>11.0</td>\n",
       "      <td>107.0</td>\n",
       "      <td>37.3</td>\n",
       "      <td>40.0</td>\n",
       "      <td>77.5</td>\n",
       "      <td>115.0</td>\n",
       "      <td>142.5</td>\n",
       "      <td>150.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>23.0</td>\n",
       "      <td>85.3</td>\n",
       "      <td>43.4</td>\n",
       "      <td>20.0</td>\n",
       "      <td>51.5</td>\n",
       "      <td>78.0</td>\n",
       "      <td>123.5</td>\n",
       "      <td>149.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>74.3</td>\n",
       "      <td>...</td>\n",
       "      <td>122.0</td>\n",
       "      <td>135.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>84.1</td>\n",
       "      <td>47.2</td>\n",
       "      <td>12.0</td>\n",
       "      <td>37.5</td>\n",
       "      <td>95.0</td>\n",
       "      <td>124.5</td>\n",
       "      <td>144.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>16.0</td>\n",
       "      <td>87.3</td>\n",
       "      <td>40.3</td>\n",
       "      <td>20.0</td>\n",
       "      <td>56.8</td>\n",
       "      <td>89.5</td>\n",
       "      <td>118.5</td>\n",
       "      <td>148.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>82.9</td>\n",
       "      <td>...</td>\n",
       "      <td>129.8</td>\n",
       "      <td>146.0</td>\n",
       "      <td>16.0</td>\n",
       "      <td>96.9</td>\n",
       "      <td>35.2</td>\n",
       "      <td>31.0</td>\n",
       "      <td>80.2</td>\n",
       "      <td>99.0</td>\n",
       "      <td>122.5</td>\n",
       "      <td>144.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>16 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python                                              Math        ...  \\\n",
       "           count  mean   std   min   25%   50%    75%    max count  mean  ...   \n",
       "sex class                                                                 ...   \n",
       "女   1       15.0  77.0  47.8   7.0  35.0  70.0  114.0  144.0  15.0  80.7  ...   \n",
       "    2       21.0  63.6  43.5   6.0  25.0  68.0   89.0  147.0  21.0  72.4  ...   \n",
       "    3       22.0  82.6  34.6   9.0  63.5  89.5  109.5  131.0  22.0  85.7  ...   \n",
       "    4       20.0  70.7  45.9   0.0  37.5  68.5  109.5  147.0  20.0  66.6  ...   \n",
       "    5       17.0  79.2  42.2   1.0  46.0  89.0  116.0  136.0  17.0  80.8  ...   \n",
       "    6       21.0  58.9  46.0   2.0  19.0  46.0   82.0  149.0  21.0  71.4  ...   \n",
       "    7       23.0  65.2  43.5   2.0  29.5  67.0  102.5  136.0  23.0  67.6  ...   \n",
       "    8       23.0  76.4  46.5   0.0  32.0  74.0  112.0  145.0  23.0  84.6  ...   \n",
       "男   1       16.0  72.8  49.2   1.0  34.8  69.0  117.0  142.0  16.0  78.4  ...   \n",
       "    2       18.0  46.4  28.2   6.0  27.5  45.0   62.5  114.0  18.0  67.7  ...   \n",
       "    3       15.0  73.8  44.5   2.0  37.5  87.0  108.0  128.0  15.0  61.7  ...   \n",
       "    4       22.0  67.5  39.1   4.0  37.2  74.0   95.2  144.0  22.0  70.3  ...   \n",
       "    5       17.0  88.2  42.2  13.0  43.0  93.0  129.0  138.0  17.0  77.1  ...   \n",
       "    6       11.0  80.5  46.3   3.0  50.0  79.0  113.5  146.0  11.0  49.1  ...   \n",
       "    7       23.0  85.3  43.4  20.0  51.5  78.0  123.5  149.0  23.0  74.3  ...   \n",
       "    8       16.0  87.3  40.3  20.0  56.8  89.5  118.5  148.0  16.0  82.9  ...   \n",
       "\n",
       "                           En                                                \n",
       "             75%    max count   mean   std   min   25%    50%    75%    max  \n",
       "sex class                                                                    \n",
       "女   1      120.0  149.0  15.0   66.7  39.7   2.0  37.5   68.0   88.5  143.0  \n",
       "    2      107.0  135.0  21.0   59.8  45.8   7.0  25.0   48.0   89.0  148.0  \n",
       "    3      134.2  146.0  22.0   72.7  34.9   7.0  44.0   72.5  100.2  141.0  \n",
       "    4       95.0  138.0  20.0   69.8  39.1   2.0  46.0   81.0   95.8  127.0  \n",
       "    5      118.0  147.0  17.0   71.9  39.3   1.0  44.0   77.0   94.0  129.0  \n",
       "    6      112.0  146.0  21.0   57.4  41.7   5.0  23.0   57.0   86.0  147.0  \n",
       "    7      108.5  148.0  23.0   78.0  48.6   4.0  37.5   69.0  127.0  146.0  \n",
       "    8      120.0  142.0  23.0   73.7  47.7   0.0  37.0   73.0  120.5  146.0  \n",
       "男   1      111.0  142.0  16.0   82.1  34.7  11.0  65.8   83.0  108.0  130.0  \n",
       "    2      112.2  138.0  18.0   70.1  47.7   3.0  28.8   68.5  109.0  145.0  \n",
       "    3       89.0  137.0  15.0   55.3  34.2  17.0  25.0   44.0   86.5  113.0  \n",
       "    4      110.0  148.0  22.0   86.6  41.1   2.0  63.2   96.5  119.0  137.0  \n",
       "    5      113.0  135.0  17.0   78.4  42.4  19.0  45.0   75.0  120.0  142.0  \n",
       "    6       80.0  144.0  11.0  107.0  37.3  40.0  77.5  115.0  142.5  150.0  \n",
       "    7      122.0  135.0  23.0   84.1  47.2  12.0  37.5   95.0  124.5  144.0  \n",
       "    8      129.8  146.0  16.0   96.9  35.2  31.0  80.2   99.0  122.5  144.0  \n",
       "\n",
       "[16 rows x 24 columns]"
      ]
     },
     "execution_count": 192,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).describe().round(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 分组聚合apply、transform"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 194,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>77.0</td>\n",
       "      <td>66.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>63.6</td>\n",
       "      <td>59.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>82.6</td>\n",
       "      <td>72.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>70.7</td>\n",
       "      <td>69.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>79.2</td>\n",
       "      <td>71.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>58.9</td>\n",
       "      <td>57.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>65.2</td>\n",
       "      <td>78.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.4</td>\n",
       "      <td>73.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>72.8</td>\n",
       "      <td>82.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>46.4</td>\n",
       "      <td>70.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>73.8</td>\n",
       "      <td>55.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>67.5</td>\n",
       "      <td>86.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>88.2</td>\n",
       "      <td>78.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.5</td>\n",
       "      <td>107.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>85.3</td>\n",
       "      <td>84.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>87.3</td>\n",
       "      <td>96.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Python     En\n",
       "sex class               \n",
       "女   1        77.0   66.7\n",
       "    2        63.6   59.8\n",
       "    3        82.6   72.7\n",
       "    4        70.7   69.8\n",
       "    5        79.2   71.9\n",
       "    6        58.9   57.4\n",
       "    7        65.2   78.0\n",
       "    8        76.4   73.7\n",
       "男   1        72.8   82.1\n",
       "    2        46.4   70.1\n",
       "    3        73.8   55.3\n",
       "    4        67.5   86.6\n",
       "    5        88.2   78.4\n",
       "    6        80.5  107.0\n",
       "    7        85.3   84.1\n",
       "    8        87.3   96.9"
      ]
     },
     "execution_count": 194,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# apply聚合结果，少\n",
    "df.groupby(by = ['sex','class'])[['Python','En']].apply(np.mean).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 195,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>82.6</td>\n",
       "      <td>72.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>85.3</td>\n",
       "      <td>84.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>72.8</td>\n",
       "      <td>82.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>67.5</td>\n",
       "      <td>86.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>87.3</td>\n",
       "      <td>96.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>295</th>\n",
       "      <td>85.3</td>\n",
       "      <td>84.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>76.4</td>\n",
       "      <td>73.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>67.5</td>\n",
       "      <td>86.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>70.7</td>\n",
       "      <td>69.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299</th>\n",
       "      <td>85.3</td>\n",
       "      <td>84.1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>300 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     Python    En\n",
       "0      82.6  72.7\n",
       "1      85.3  84.1\n",
       "2      72.8  82.1\n",
       "3      67.5  86.6\n",
       "4      87.3  96.9\n",
       "..      ...   ...\n",
       "295    85.3  84.1\n",
       "296    76.4  73.7\n",
       "297    67.5  86.6\n",
       "298    70.7  69.8\n",
       "299    85.3  84.1\n",
       "\n",
       "[300 rows x 2 columns]"
      ]
     },
     "execution_count": 195,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# transform 计算，返回的结果，还是DataFrame长度\n",
    "df.groupby(by = ['sex','class'])[['Python','En']].transform(np.mean).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 196,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>82.6</td>\n",
       "      <td>72.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>85.3</td>\n",
       "      <td>84.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>72.8</td>\n",
       "      <td>82.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>67.5</td>\n",
       "      <td>86.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>87.3</td>\n",
       "      <td>96.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>295</th>\n",
       "      <td>85.3</td>\n",
       "      <td>84.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>76.4</td>\n",
       "      <td>73.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>67.5</td>\n",
       "      <td>86.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>70.7</td>\n",
       "      <td>69.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>299</th>\n",
       "      <td>85.3</td>\n",
       "      <td>84.1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>300 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     Python    En\n",
       "0      82.6  72.7\n",
       "1      85.3  84.1\n",
       "2      72.8  82.1\n",
       "3      67.5  86.6\n",
       "4      87.3  96.9\n",
       "..      ...   ...\n",
       "295    85.3  84.1\n",
       "296    76.4  73.7\n",
       "297    67.5  86.6\n",
       "298    70.7  69.8\n",
       "299    85.3  84.1\n",
       "\n",
       "[300 rows x 2 columns]"
      ]
     },
     "execution_count": 196,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def _mean(x): #自己定义求平均值方法\n",
    "    return np.round(x.mean(),1)\n",
    "df.groupby(by = ['sex','class'])[['Python','En']].transform(_mean)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 分组聚合agg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 197,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"3\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"3\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>amax</th>\n",
       "      <th>amin</th>\n",
       "      <th>mean</th>\n",
       "      <th>amax</th>\n",
       "      <th>amin</th>\n",
       "      <th>mean</th>\n",
       "      <th>amax</th>\n",
       "      <th>amin</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>77.0</td>\n",
       "      <td>144</td>\n",
       "      <td>7</td>\n",
       "      <td>80.7</td>\n",
       "      <td>149</td>\n",
       "      <td>1</td>\n",
       "      <td>66.7</td>\n",
       "      <td>143</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>63.6</td>\n",
       "      <td>147</td>\n",
       "      <td>6</td>\n",
       "      <td>72.4</td>\n",
       "      <td>135</td>\n",
       "      <td>0</td>\n",
       "      <td>59.8</td>\n",
       "      <td>148</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>82.6</td>\n",
       "      <td>131</td>\n",
       "      <td>9</td>\n",
       "      <td>85.7</td>\n",
       "      <td>146</td>\n",
       "      <td>1</td>\n",
       "      <td>72.7</td>\n",
       "      <td>141</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>70.7</td>\n",
       "      <td>147</td>\n",
       "      <td>0</td>\n",
       "      <td>66.6</td>\n",
       "      <td>138</td>\n",
       "      <td>2</td>\n",
       "      <td>69.8</td>\n",
       "      <td>127</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>79.2</td>\n",
       "      <td>136</td>\n",
       "      <td>1</td>\n",
       "      <td>80.8</td>\n",
       "      <td>147</td>\n",
       "      <td>1</td>\n",
       "      <td>71.9</td>\n",
       "      <td>129</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>58.9</td>\n",
       "      <td>149</td>\n",
       "      <td>2</td>\n",
       "      <td>71.4</td>\n",
       "      <td>146</td>\n",
       "      <td>2</td>\n",
       "      <td>57.4</td>\n",
       "      <td>147</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>65.2</td>\n",
       "      <td>136</td>\n",
       "      <td>2</td>\n",
       "      <td>67.6</td>\n",
       "      <td>148</td>\n",
       "      <td>4</td>\n",
       "      <td>78.0</td>\n",
       "      <td>146</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.4</td>\n",
       "      <td>145</td>\n",
       "      <td>0</td>\n",
       "      <td>84.6</td>\n",
       "      <td>142</td>\n",
       "      <td>3</td>\n",
       "      <td>73.7</td>\n",
       "      <td>146</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>72.8</td>\n",
       "      <td>142</td>\n",
       "      <td>1</td>\n",
       "      <td>78.4</td>\n",
       "      <td>142</td>\n",
       "      <td>2</td>\n",
       "      <td>82.1</td>\n",
       "      <td>130</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>46.4</td>\n",
       "      <td>114</td>\n",
       "      <td>6</td>\n",
       "      <td>67.7</td>\n",
       "      <td>138</td>\n",
       "      <td>0</td>\n",
       "      <td>70.1</td>\n",
       "      <td>145</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>73.8</td>\n",
       "      <td>128</td>\n",
       "      <td>2</td>\n",
       "      <td>61.7</td>\n",
       "      <td>137</td>\n",
       "      <td>0</td>\n",
       "      <td>55.3</td>\n",
       "      <td>113</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>67.5</td>\n",
       "      <td>144</td>\n",
       "      <td>4</td>\n",
       "      <td>70.3</td>\n",
       "      <td>148</td>\n",
       "      <td>2</td>\n",
       "      <td>86.6</td>\n",
       "      <td>137</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>88.2</td>\n",
       "      <td>138</td>\n",
       "      <td>13</td>\n",
       "      <td>77.1</td>\n",
       "      <td>135</td>\n",
       "      <td>15</td>\n",
       "      <td>78.4</td>\n",
       "      <td>142</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.5</td>\n",
       "      <td>146</td>\n",
       "      <td>3</td>\n",
       "      <td>49.1</td>\n",
       "      <td>144</td>\n",
       "      <td>1</td>\n",
       "      <td>107.0</td>\n",
       "      <td>150</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>85.3</td>\n",
       "      <td>149</td>\n",
       "      <td>20</td>\n",
       "      <td>74.3</td>\n",
       "      <td>135</td>\n",
       "      <td>1</td>\n",
       "      <td>84.1</td>\n",
       "      <td>144</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>87.3</td>\n",
       "      <td>148</td>\n",
       "      <td>20</td>\n",
       "      <td>82.9</td>\n",
       "      <td>146</td>\n",
       "      <td>2</td>\n",
       "      <td>96.9</td>\n",
       "      <td>144</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python            Math               En          \n",
       "            mean amax amin  mean amax amin   mean amax amin\n",
       "sex class                                                  \n",
       "女   1       77.0  144    7  80.7  149    1   66.7  143    2\n",
       "    2       63.6  147    6  72.4  135    0   59.8  148    7\n",
       "    3       82.6  131    9  85.7  146    1   72.7  141    7\n",
       "    4       70.7  147    0  66.6  138    2   69.8  127    2\n",
       "    5       79.2  136    1  80.8  147    1   71.9  129    1\n",
       "    6       58.9  149    2  71.4  146    2   57.4  147    5\n",
       "    7       65.2  136    2  67.6  148    4   78.0  146    4\n",
       "    8       76.4  145    0  84.6  142    3   73.7  146    0\n",
       "男   1       72.8  142    1  78.4  142    2   82.1  130   11\n",
       "    2       46.4  114    6  67.7  138    0   70.1  145    3\n",
       "    3       73.8  128    2  61.7  137    0   55.3  113   17\n",
       "    4       67.5  144    4  70.3  148    2   86.6  137    2\n",
       "    5       88.2  138   13  77.1  135   15   78.4  142   19\n",
       "    6       80.5  146    3  49.1  144    1  107.0  150   40\n",
       "    7       85.3  149   20  74.3  135    1   84.1  144   12\n",
       "    8       87.3  148   20  82.9  146    2   96.9  144   31"
      ]
     },
     "execution_count": 197,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).agg([np.mean,np.max,np.min]).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 198,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">Python</th>\n",
       "      <th colspan=\"3\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"3\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>平均值</th>\n",
       "      <th>最大值</th>\n",
       "      <th>最小值</th>\n",
       "      <th>平均值</th>\n",
       "      <th>最大值</th>\n",
       "      <th>最小值</th>\n",
       "      <th>平均值</th>\n",
       "      <th>最大值</th>\n",
       "      <th>最小值</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>77.0</td>\n",
       "      <td>144</td>\n",
       "      <td>7</td>\n",
       "      <td>80.7</td>\n",
       "      <td>149</td>\n",
       "      <td>1</td>\n",
       "      <td>66.7</td>\n",
       "      <td>143</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>63.6</td>\n",
       "      <td>147</td>\n",
       "      <td>6</td>\n",
       "      <td>72.4</td>\n",
       "      <td>135</td>\n",
       "      <td>0</td>\n",
       "      <td>59.8</td>\n",
       "      <td>148</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>82.6</td>\n",
       "      <td>131</td>\n",
       "      <td>9</td>\n",
       "      <td>85.7</td>\n",
       "      <td>146</td>\n",
       "      <td>1</td>\n",
       "      <td>72.7</td>\n",
       "      <td>141</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>70.7</td>\n",
       "      <td>147</td>\n",
       "      <td>0</td>\n",
       "      <td>66.6</td>\n",
       "      <td>138</td>\n",
       "      <td>2</td>\n",
       "      <td>69.8</td>\n",
       "      <td>127</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>79.2</td>\n",
       "      <td>136</td>\n",
       "      <td>1</td>\n",
       "      <td>80.8</td>\n",
       "      <td>147</td>\n",
       "      <td>1</td>\n",
       "      <td>71.9</td>\n",
       "      <td>129</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>58.9</td>\n",
       "      <td>149</td>\n",
       "      <td>2</td>\n",
       "      <td>71.4</td>\n",
       "      <td>146</td>\n",
       "      <td>2</td>\n",
       "      <td>57.4</td>\n",
       "      <td>147</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>65.2</td>\n",
       "      <td>136</td>\n",
       "      <td>2</td>\n",
       "      <td>67.6</td>\n",
       "      <td>148</td>\n",
       "      <td>4</td>\n",
       "      <td>78.0</td>\n",
       "      <td>146</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.4</td>\n",
       "      <td>145</td>\n",
       "      <td>0</td>\n",
       "      <td>84.6</td>\n",
       "      <td>142</td>\n",
       "      <td>3</td>\n",
       "      <td>73.7</td>\n",
       "      <td>146</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>72.8</td>\n",
       "      <td>142</td>\n",
       "      <td>1</td>\n",
       "      <td>78.4</td>\n",
       "      <td>142</td>\n",
       "      <td>2</td>\n",
       "      <td>82.1</td>\n",
       "      <td>130</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>46.4</td>\n",
       "      <td>114</td>\n",
       "      <td>6</td>\n",
       "      <td>67.7</td>\n",
       "      <td>138</td>\n",
       "      <td>0</td>\n",
       "      <td>70.1</td>\n",
       "      <td>145</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>73.8</td>\n",
       "      <td>128</td>\n",
       "      <td>2</td>\n",
       "      <td>61.7</td>\n",
       "      <td>137</td>\n",
       "      <td>0</td>\n",
       "      <td>55.3</td>\n",
       "      <td>113</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>67.5</td>\n",
       "      <td>144</td>\n",
       "      <td>4</td>\n",
       "      <td>70.3</td>\n",
       "      <td>148</td>\n",
       "      <td>2</td>\n",
       "      <td>86.6</td>\n",
       "      <td>137</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>88.2</td>\n",
       "      <td>138</td>\n",
       "      <td>13</td>\n",
       "      <td>77.1</td>\n",
       "      <td>135</td>\n",
       "      <td>15</td>\n",
       "      <td>78.4</td>\n",
       "      <td>142</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.5</td>\n",
       "      <td>146</td>\n",
       "      <td>3</td>\n",
       "      <td>49.1</td>\n",
       "      <td>144</td>\n",
       "      <td>1</td>\n",
       "      <td>107.0</td>\n",
       "      <td>150</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>85.3</td>\n",
       "      <td>149</td>\n",
       "      <td>20</td>\n",
       "      <td>74.3</td>\n",
       "      <td>135</td>\n",
       "      <td>1</td>\n",
       "      <td>84.1</td>\n",
       "      <td>144</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>87.3</td>\n",
       "      <td>148</td>\n",
       "      <td>20</td>\n",
       "      <td>82.9</td>\n",
       "      <td>146</td>\n",
       "      <td>2</td>\n",
       "      <td>96.9</td>\n",
       "      <td>144</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python           Math              En         \n",
       "             平均值  最大值 最小值   平均值  最大值 最小值    平均值  最大值 最小值\n",
       "sex class                                               \n",
       "女   1       77.0  144   7  80.7  149   1   66.7  143   2\n",
       "    2       63.6  147   6  72.4  135   0   59.8  148   7\n",
       "    3       82.6  131   9  85.7  146   1   72.7  141   7\n",
       "    4       70.7  147   0  66.6  138   2   69.8  127   2\n",
       "    5       79.2  136   1  80.8  147   1   71.9  129   1\n",
       "    6       58.9  149   2  71.4  146   2   57.4  147   5\n",
       "    7       65.2  136   2  67.6  148   4   78.0  146   4\n",
       "    8       76.4  145   0  84.6  142   3   73.7  146   0\n",
       "男   1       72.8  142   1  78.4  142   2   82.1  130  11\n",
       "    2       46.4  114   6  67.7  138   0   70.1  145   3\n",
       "    3       73.8  128   2  61.7  137   0   55.3  113  17\n",
       "    4       67.5  144   4  70.3  148   2   86.6  137   2\n",
       "    5       88.2  138  13  77.1  135  15   78.4  142  19\n",
       "    6       80.5  146   3  49.1  144   1  107.0  150  40\n",
       "    7       85.3  149  20  74.3  135   1   84.1  144  12\n",
       "    8       87.3  148  20  82.9  146   2   96.9  144  31"
      ]
     },
     "execution_count": 198,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).agg([('平均值',np.mean),('最大值',np.max),('最小值',np.min)]).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 199,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th>Math</th>\n",
       "      <th>En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>144</td>\n",
       "      <td>1</td>\n",
       "      <td>66.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>147</td>\n",
       "      <td>0</td>\n",
       "      <td>59.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>131</td>\n",
       "      <td>1</td>\n",
       "      <td>72.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>147</td>\n",
       "      <td>2</td>\n",
       "      <td>69.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>136</td>\n",
       "      <td>1</td>\n",
       "      <td>71.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>149</td>\n",
       "      <td>2</td>\n",
       "      <td>57.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>136</td>\n",
       "      <td>4</td>\n",
       "      <td>78.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>145</td>\n",
       "      <td>3</td>\n",
       "      <td>73.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>142</td>\n",
       "      <td>2</td>\n",
       "      <td>82.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>114</td>\n",
       "      <td>0</td>\n",
       "      <td>70.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>128</td>\n",
       "      <td>0</td>\n",
       "      <td>55.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>144</td>\n",
       "      <td>2</td>\n",
       "      <td>86.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>138</td>\n",
       "      <td>15</td>\n",
       "      <td>78.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>146</td>\n",
       "      <td>1</td>\n",
       "      <td>107.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>149</td>\n",
       "      <td>1</td>\n",
       "      <td>84.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>148</td>\n",
       "      <td>2</td>\n",
       "      <td>96.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Python  Math     En\n",
       "sex class                     \n",
       "女   1         144     1   66.7\n",
       "    2         147     0   59.8\n",
       "    3         131     1   72.7\n",
       "    4         147     2   69.8\n",
       "    5         136     1   71.9\n",
       "    6         149     2   57.4\n",
       "    7         136     4   78.0\n",
       "    8         145     3   73.7\n",
       "男   1         142     2   82.1\n",
       "    2         114     0   70.1\n",
       "    3         128     0   55.3\n",
       "    4         144     2   86.6\n",
       "    5         138    15   78.4\n",
       "    6         146     1  107.0\n",
       "    7         149     1   84.1\n",
       "    8         148     2   96.9"
      ]
     },
     "execution_count": 199,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 不同列进行不同计算\n",
    "df.groupby(by = ['sex','class']).agg({'Python':np.max,'Math':np.min,'En':np.mean}).round(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 透视表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>En</th>\n",
       "      <th>Python</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>66.7</td>\n",
       "      <td>77.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>59.8</td>\n",
       "      <td>63.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>72.7</td>\n",
       "      <td>82.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>69.8</td>\n",
       "      <td>70.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>71.9</td>\n",
       "      <td>79.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>57.4</td>\n",
       "      <td>58.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>78.0</td>\n",
       "      <td>65.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>73.7</td>\n",
       "      <td>76.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>82.1</td>\n",
       "      <td>72.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>70.1</td>\n",
       "      <td>46.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>55.3</td>\n",
       "      <td>73.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>86.6</td>\n",
       "      <td>67.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>78.4</td>\n",
       "      <td>88.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>107.0</td>\n",
       "      <td>80.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>84.1</td>\n",
       "      <td>85.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>96.9</td>\n",
       "      <td>87.3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              En  Python\n",
       "sex class               \n",
       "女   1       66.7    77.0\n",
       "    2       59.8    63.6\n",
       "    3       72.7    82.6\n",
       "    4       69.8    70.7\n",
       "    5       71.9    79.2\n",
       "    6       57.4    58.9\n",
       "    7       78.0    65.2\n",
       "    8       73.7    76.4\n",
       "男   1       82.1    72.8\n",
       "    2       70.1    46.4\n",
       "    3       55.3    73.8\n",
       "    4       86.6    67.5\n",
       "    5       78.4    88.2\n",
       "    6      107.0    80.5\n",
       "    7       84.1    85.3\n",
       "    8       96.9    87.3"
      ]
     },
     "execution_count": 200,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.pivot_table(values=['Python','En'],index = ['sex','class'],aggfunc='mean').round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 201,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">En</th>\n",
       "      <th colspan=\"2\" halign=\"left\">Math</th>\n",
       "      <th>Python</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>方差</th>\n",
       "      <th>标准差</th>\n",
       "      <th>计数</th>\n",
       "      <th>最大值</th>\n",
       "      <th>最小值</th>\n",
       "      <th>平均值</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>1574.7</td>\n",
       "      <td>39.7</td>\n",
       "      <td>15.0</td>\n",
       "      <td>149</td>\n",
       "      <td>1</td>\n",
       "      <td>77.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2099.1</td>\n",
       "      <td>45.8</td>\n",
       "      <td>21.0</td>\n",
       "      <td>135</td>\n",
       "      <td>0</td>\n",
       "      <td>63.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1217.2</td>\n",
       "      <td>34.9</td>\n",
       "      <td>22.0</td>\n",
       "      <td>146</td>\n",
       "      <td>1</td>\n",
       "      <td>82.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1528.7</td>\n",
       "      <td>39.1</td>\n",
       "      <td>20.0</td>\n",
       "      <td>138</td>\n",
       "      <td>2</td>\n",
       "      <td>70.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1541.8</td>\n",
       "      <td>39.3</td>\n",
       "      <td>17.0</td>\n",
       "      <td>147</td>\n",
       "      <td>1</td>\n",
       "      <td>79.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1739.5</td>\n",
       "      <td>41.7</td>\n",
       "      <td>21.0</td>\n",
       "      <td>146</td>\n",
       "      <td>2</td>\n",
       "      <td>58.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2364.4</td>\n",
       "      <td>48.6</td>\n",
       "      <td>23.0</td>\n",
       "      <td>148</td>\n",
       "      <td>4</td>\n",
       "      <td>65.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2275.0</td>\n",
       "      <td>47.7</td>\n",
       "      <td>23.0</td>\n",
       "      <td>142</td>\n",
       "      <td>3</td>\n",
       "      <td>76.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>1206.3</td>\n",
       "      <td>34.7</td>\n",
       "      <td>16.0</td>\n",
       "      <td>142</td>\n",
       "      <td>2</td>\n",
       "      <td>72.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2274.8</td>\n",
       "      <td>47.7</td>\n",
       "      <td>18.0</td>\n",
       "      <td>138</td>\n",
       "      <td>0</td>\n",
       "      <td>46.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1169.8</td>\n",
       "      <td>34.2</td>\n",
       "      <td>15.0</td>\n",
       "      <td>137</td>\n",
       "      <td>0</td>\n",
       "      <td>73.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1689.2</td>\n",
       "      <td>41.1</td>\n",
       "      <td>22.0</td>\n",
       "      <td>148</td>\n",
       "      <td>2</td>\n",
       "      <td>67.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1797.6</td>\n",
       "      <td>42.4</td>\n",
       "      <td>17.0</td>\n",
       "      <td>135</td>\n",
       "      <td>15</td>\n",
       "      <td>88.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1394.2</td>\n",
       "      <td>37.3</td>\n",
       "      <td>11.0</td>\n",
       "      <td>144</td>\n",
       "      <td>1</td>\n",
       "      <td>80.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2223.6</td>\n",
       "      <td>47.2</td>\n",
       "      <td>23.0</td>\n",
       "      <td>135</td>\n",
       "      <td>1</td>\n",
       "      <td>85.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1240.0</td>\n",
       "      <td>35.2</td>\n",
       "      <td>16.0</td>\n",
       "      <td>146</td>\n",
       "      <td>2</td>\n",
       "      <td>87.3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               En             Math     Python\n",
       "               方差   标准差    计数  最大值 最小值    平均值\n",
       "sex class                                    \n",
       "女   1      1574.7  39.7  15.0  149   1   77.0\n",
       "    2      2099.1  45.8  21.0  135   0   63.6\n",
       "    3      1217.2  34.9  22.0  146   1   82.6\n",
       "    4      1528.7  39.1  20.0  138   2   70.7\n",
       "    5      1541.8  39.3  17.0  147   1   79.2\n",
       "    6      1739.5  41.7  21.0  146   2   58.9\n",
       "    7      2364.4  48.6  23.0  148   4   65.2\n",
       "    8      2275.0  47.7  23.0  142   3   76.4\n",
       "男   1      1206.3  34.7  16.0  142   2   72.8\n",
       "    2      2274.8  47.7  18.0  138   0   46.4\n",
       "    3      1169.8  34.2  15.0  137   0   73.8\n",
       "    4      1689.2  41.1  22.0  148   2   67.5\n",
       "    5      1797.6  42.4  17.0  135  15   88.2\n",
       "    6      1394.2  37.3  11.0  144   1   80.5\n",
       "    7      2223.6  47.2  23.0  135   1   85.3\n",
       "    8      1240.0  35.2  16.0  146   2   87.3"
      ]
     },
     "execution_count": 201,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.pivot_table(values=['Python','Math','En'], # 要’透视‘值\n",
    "               index = ['sex','class'], # 索引，根据什么进行’透视‘ == 分组\n",
    "               aggfunc={'Python':[('平均值',np.mean)],\n",
    "                        'Math':[('最小值',np.min),('最大值',np.max)],\n",
    "                        'En':[('标准差',np.std),('方差',np.var),('计数',np.size)]}).round(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Python</th>\n",
       "      <th colspan=\"2\" halign=\"left\">Math</th>\n",
       "      <th colspan=\"3\" halign=\"left\">En</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>平均值</th>\n",
       "      <th>最小值</th>\n",
       "      <th>最大值</th>\n",
       "      <th>标准差</th>\n",
       "      <th>方差</th>\n",
       "      <th>计数</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sex</th>\n",
       "      <th>class</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">女</th>\n",
       "      <th>1</th>\n",
       "      <td>77.0</td>\n",
       "      <td>1</td>\n",
       "      <td>149</td>\n",
       "      <td>39.7</td>\n",
       "      <td>1574.7</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>63.6</td>\n",
       "      <td>0</td>\n",
       "      <td>135</td>\n",
       "      <td>45.8</td>\n",
       "      <td>2099.1</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>82.6</td>\n",
       "      <td>1</td>\n",
       "      <td>146</td>\n",
       "      <td>34.9</td>\n",
       "      <td>1217.2</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>70.7</td>\n",
       "      <td>2</td>\n",
       "      <td>138</td>\n",
       "      <td>39.1</td>\n",
       "      <td>1528.7</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>79.2</td>\n",
       "      <td>1</td>\n",
       "      <td>147</td>\n",
       "      <td>39.3</td>\n",
       "      <td>1541.8</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>58.9</td>\n",
       "      <td>2</td>\n",
       "      <td>146</td>\n",
       "      <td>41.7</td>\n",
       "      <td>1739.5</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>65.2</td>\n",
       "      <td>4</td>\n",
       "      <td>148</td>\n",
       "      <td>48.6</td>\n",
       "      <td>2364.4</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>76.4</td>\n",
       "      <td>3</td>\n",
       "      <td>142</td>\n",
       "      <td>47.7</td>\n",
       "      <td>2275.0</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"8\" valign=\"top\">男</th>\n",
       "      <th>1</th>\n",
       "      <td>72.8</td>\n",
       "      <td>2</td>\n",
       "      <td>142</td>\n",
       "      <td>34.7</td>\n",
       "      <td>1206.3</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>46.4</td>\n",
       "      <td>0</td>\n",
       "      <td>138</td>\n",
       "      <td>47.7</td>\n",
       "      <td>2274.8</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>73.8</td>\n",
       "      <td>0</td>\n",
       "      <td>137</td>\n",
       "      <td>34.2</td>\n",
       "      <td>1169.8</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>67.5</td>\n",
       "      <td>2</td>\n",
       "      <td>148</td>\n",
       "      <td>41.1</td>\n",
       "      <td>1689.2</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>88.2</td>\n",
       "      <td>15</td>\n",
       "      <td>135</td>\n",
       "      <td>42.4</td>\n",
       "      <td>1797.6</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>80.5</td>\n",
       "      <td>1</td>\n",
       "      <td>144</td>\n",
       "      <td>37.3</td>\n",
       "      <td>1394.2</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>85.3</td>\n",
       "      <td>1</td>\n",
       "      <td>135</td>\n",
       "      <td>47.2</td>\n",
       "      <td>2223.6</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>87.3</td>\n",
       "      <td>2</td>\n",
       "      <td>146</td>\n",
       "      <td>35.2</td>\n",
       "      <td>1240.0</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Python Math         En            \n",
       "             平均值  最小值  最大值   标准差      方差  计数\n",
       "sex class                                   \n",
       "女   1       77.0    1  149  39.7  1574.7  15\n",
       "    2       63.6    0  135  45.8  2099.1  21\n",
       "    3       82.6    1  146  34.9  1217.2  22\n",
       "    4       70.7    2  138  39.1  1528.7  20\n",
       "    5       79.2    1  147  39.3  1541.8  17\n",
       "    6       58.9    2  146  41.7  1739.5  21\n",
       "    7       65.2    4  148  48.6  2364.4  23\n",
       "    8       76.4    3  142  47.7  2275.0  23\n",
       "男   1       72.8    2  142  34.7  1206.3  16\n",
       "    2       46.4    0  138  47.7  2274.8  18\n",
       "    3       73.8    0  137  34.2  1169.8  15\n",
       "    4       67.5    2  148  41.1  1689.2  22\n",
       "    5       88.2   15  135  42.4  1797.6  17\n",
       "    6       80.5    1  144  37.3  1394.2  11\n",
       "    7       85.3    1  135  47.2  2223.6  23\n",
       "    8       87.3    2  146  35.2  1240.0  16"
      ]
     },
     "execution_count": 202,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(by = ['sex','class']).agg({'Python':[('平均值',np.mean)],\n",
    "                        'Math':[('最小值',np.min),('最大值',np.max)],\n",
    "                        'En':[('标准差',np.std),('方差',np.var),('计数',np.size)]}).round(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "## 时间序列"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### 时间戳操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 203,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-09-15 20:00:00')"
      ]
     },
     "execution_count": 203,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Timestamp('2020.09.15 20') # 时刻数据，具体点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 204,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Period('2020-09', 'M')"
      ]
     },
     "execution_count": 204,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Period('2020.09.15',freq='M') # 时期数据，表示一段时间，频率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 205,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2020-09-15', '2020-09-16', '2020-09-17', '2020-09-18',\n",
       "               '2020-09-19', '2020-09-20', '2020-09-21', '2020-09-22',\n",
       "               '2020-09-23', '2020-09-24'],\n",
       "              dtype='datetime64[ns]', freq='D')"
      ]
     },
     "execution_count": 205,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "index = pd.date_range('2020.09.15',freq='D',periods=10)\n",
    "index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 206,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "PeriodIndex(['2020-09-15', '2020-09-16', '2020-09-17', '2020-09-18',\n",
       "             '2020-09-19', '2020-09-20', '2020-09-21', '2020-09-22',\n",
       "             '2020-09-23', '2020-09-24'],\n",
       "            dtype='period[D]', freq='D')"
      ]
     },
     "execution_count": 206,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.period_range('2020.09.15',periods=10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 207,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    9\n",
       "2020-09-16    4\n",
       "2020-09-17    1\n",
       "2020-09-18    3\n",
       "2020-09-19    2\n",
       "2020-09-20    0\n",
       "2020-09-21    7\n",
       "2020-09-22    3\n",
       "2020-09-23    6\n",
       "2020-09-24    3\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 207,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts = pd.Series(np.random.randint(0,10,size = 10),index = index)\n",
    "ts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 208,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2020-09-15', '2020-09-15', '2020-09-15', '2020-09-15'], dtype='datetime64[ns]', freq=None)"
      ]
     },
     "execution_count": 208,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 时间戳的转换\n",
    "pd.to_datetime(['2020.09.15','2020-09-15','2020/09/15','15/09/2020'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 209,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1631107928.1480918"
      ]
     },
     "execution_count": 209,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import time\n",
    "time.time() # 秒"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 210,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-09-15 12:06:46')"
      ]
     },
     "execution_count": 210,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.to_datetime(1600171606,unit='s')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 211,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-09-15 12:06:46.469000')"
      ]
     },
     "execution_count": 211,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dt = pd.to_datetime(1600171606469,unit='ms') # 世界标准时间\n",
    "dt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 212,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-09-15 20:06:46.469000')"
      ]
     },
     "execution_count": 212,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dt + pd.DateOffset(hours = 8) # 北京时间"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 213,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Timestamp('2020-12-24 12:06:46.469000')"
      ]
     },
     "execution_count": 213,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dt + pd.DateOffset(days = 100) # 100天之后日期"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true,
    "hidden": true
   },
   "source": [
    "### 时间戳索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 214,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    280\n",
       "2020-09-16    165\n",
       "2020-09-17    283\n",
       "2020-09-18     42\n",
       "2020-09-19    151\n",
       "             ... \n",
       "2021-03-29     45\n",
       "2021-03-30    260\n",
       "2021-03-31    256\n",
       "2021-04-01      0\n",
       "2021-04-02    196\n",
       "Freq: D, Length: 200, dtype: int64"
      ]
     },
     "execution_count": 214,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts = pd.Series(np.random.randint(0,300,size = 200),\n",
    "               index=pd.date_range('2020-09-15',freq='D',periods=200))\n",
    "ts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 215,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "42"
      ]
     },
     "execution_count": 215,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# str字符串，进行索引\n",
    "ts['2020/09/18']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 216,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    280\n",
       "2020-09-16    165\n",
       "2020-09-17    283\n",
       "2020-09-18     42\n",
       "2020-09-19    151\n",
       "2020-09-20    254\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 216,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts['2020/09/15':'2020.09.20'] # 切片操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 217,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    280\n",
       "2020-09-16    165\n",
       "2020-09-17    283\n",
       "2020-09-18     42\n",
       "2020-09-19    151\n",
       "2020-09-20    254\n",
       "2020-09-21     54\n",
       "2020-09-22     54\n",
       "2020-09-23    239\n",
       "2020-09-24    181\n",
       "2020-09-25    264\n",
       "2020-09-26      3\n",
       "2020-09-27    182\n",
       "2020-09-28    290\n",
       "2020-09-29     49\n",
       "2020-09-30    257\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 217,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts['2020/09'] # 获取了9月份的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2021-01-01    223\n",
       "2021-01-02    174\n",
       "2021-01-03    176\n",
       "2021-01-04    151\n",
       "2021-01-05    223\n",
       "             ... \n",
       "2021-03-29     45\n",
       "2021-03-30    260\n",
       "2021-03-31    256\n",
       "2021-04-01      0\n",
       "2021-04-02    196\n",
       "Freq: D, Length: 92, dtype: int64"
      ]
     },
     "execution_count": 218,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts['2021'] # 获取了2020年的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 219,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "280"
      ]
     },
     "execution_count": 219,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts[pd.Timestamp('2020.09.15')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 220,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    280\n",
       "2020-09-16    165\n",
       "2020-09-17    283\n",
       "2020-09-18     42\n",
       "2020-09-19    151\n",
       "2020-09-20    254\n",
       "2020-09-21     54\n",
       "2020-09-22     54\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 220,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts[pd.Timestamp('2020.09.15'):pd.Timestamp('2020.09.22')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 221,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Period('2020-09-15', '2D')"
      ]
     },
     "execution_count": 221,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Period('2020.09.15',freq='2D')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 222,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    280\n",
       "2020-09-18     42\n",
       "2020-09-21     54\n",
       "2020-09-24    181\n",
       "2020-09-27    182\n",
       "             ... \n",
       "2021-03-20     59\n",
       "2021-03-23    139\n",
       "2021-03-26    293\n",
       "2021-03-29     45\n",
       "2021-04-01      0\n",
       "Freq: 3D, Length: 67, dtype: int64"
      ]
     },
     "execution_count": 222,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts[pd.Timestamp('2020.09.15')::3] # 有间隔的获取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 223,
   "metadata": {
    "hidden": true,
    "scrolled": false
   },
   "outputs": [
    {
     "ename": "KeyError",
     "evalue": "Period('2020-09-15', '2D')",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-223-0e1e667908db>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mts\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPeriod\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'2020.09.15'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mfreq\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'2D'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/core/series.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m    880\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    881\u001b[0m         \u001b[0;32melif\u001b[0m \u001b[0mkey_is_scalar\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 882\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_value\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    883\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    884\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mis_hashable\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/core/series.py\u001b[0m in \u001b[0;36m_get_value\u001b[0;34m(self, label, takeable)\u001b[0m\n\u001b[1;32m    987\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    988\u001b[0m         \u001b[0;31m# Similar to Index.get_value, but we do not fall back to positional\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 989\u001b[0;31m         \u001b[0mloc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    990\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_values_for_loc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    991\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/core/indexes/datetimes.py\u001b[0m in \u001b[0;36mget_loc\u001b[0;34m(self, key, method, tolerance)\u001b[0m\n\u001b[1;32m    620\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    621\u001b[0m             \u001b[0;31m# unrecognized type\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 622\u001b[0;31m             \u001b[0;32mraise\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    623\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    624\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mKeyError\u001b[0m: Period('2020-09-15', '2D')"
     ]
    }
   ],
   "source": [
    "ts[pd.Period('2020.09.15',freq='2D')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 224,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    280\n",
       "2020-09-16    165\n",
       "2020-09-17    283\n",
       "2020-09-18     42\n",
       "2020-09-19    151\n",
       "2020-09-20    254\n",
       "2020-09-21     54\n",
       "2020-09-22     54\n",
       "2020-09-23    239\n",
       "2020-09-24    181\n",
       "2020-09-25    264\n",
       "2020-09-26      3\n",
       "2020-09-27    182\n",
       "2020-09-28    290\n",
       "2020-09-29     49\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 224,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts[pd.date_range('2020.09.15',freq='D',periods=15)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 225,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Int64Index([2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020,\n",
       "            ...\n",
       "            2021, 2021, 2021, 2021, 2021, 2021, 2021, 2021, 2021, 2021],\n",
       "           dtype='int64', length=200)"
      ]
     },
     "execution_count": 225,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.index.year"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 226,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Int64Index([259, 260, 261, 262, 263, 264, 265, 266, 267, 268,\n",
       "            ...\n",
       "             83,  84,  85,  86,  87,  88,  89,  90,  91,  92],\n",
       "           dtype='int64', length=200)"
      ]
     },
     "execution_count": 226,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.index.dayofyear # 202001915 对应着2020年的第259天"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 227,
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 228,
   "metadata": {
    "hidden": true,
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Int64Index([38, 38, 38, 38, 38, 38, 39, 39, 39, 39,\n",
       "            ...\n",
       "            12, 12, 12, 12, 12, 13, 13, 13, 13, 13],\n",
       "           dtype='int64', length=200)"
      ]
     },
     "execution_count": 228,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.index.weekofyear # 对应着一年中第多少周"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 229,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-17    280\n",
       "2020-09-18    165\n",
       "2020-09-19    283\n",
       "2020-09-20     42\n",
       "2020-09-21    151\n",
       "             ... \n",
       "2021-03-31     45\n",
       "2021-04-01    260\n",
       "2021-04-02    256\n",
       "2021-04-03      0\n",
       "2021-04-04    196\n",
       "Freq: D, Length: 200, dtype: int64"
      ]
     },
     "execution_count": 229,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods = 2,freq = pd.tseries.offsets.Day()) # 天移动"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 230,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-09-15    280\n",
       "2020-09-16    165\n",
       "2020-09-17    283\n",
       "2020-09-18     42\n",
       "2020-09-19    151\n",
       "             ... \n",
       "2021-03-29     45\n",
       "2021-03-30    260\n",
       "2021-03-31    256\n",
       "2021-04-01      0\n",
       "2021-04-02    196\n",
       "Freq: D, Length: 200, dtype: int64"
      ]
     },
     "execution_count": 230,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "### 时间序列常用操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 231,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01    418\n",
       "2020-01-02    458\n",
       "2020-01-03    480\n",
       "2020-01-04    419\n",
       "2020-01-05    837\n",
       "             ... \n",
       "2020-12-26    809\n",
       "2020-12-27    760\n",
       "2020-12-28    551\n",
       "2020-12-29    633\n",
       "2020-12-30    612\n",
       "Freq: D, Length: 365, dtype: int64"
      ]
     },
     "execution_count": 231,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts = pd.Series(np.random.randint(0,1024,size = 365),\n",
    "               index = pd.date_range('2020/1/1',freq='D',periods=365))\n",
    "ts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### 数据移动"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 232,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01      NaN\n",
       "2020-01-02      NaN\n",
       "2020-01-03    418.0\n",
       "2020-01-04    458.0\n",
       "2020-01-05    480.0\n",
       "              ...  \n",
       "2020-12-26    956.0\n",
       "2020-12-27    970.0\n",
       "2020-12-28    809.0\n",
       "2020-12-29    760.0\n",
       "2020-12-30    551.0\n",
       "Freq: D, Length: 365, dtype: float64"
      ]
     },
     "execution_count": 232,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods=2) # 数据向后移动2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 233,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01    480.0\n",
       "2020-01-02    419.0\n",
       "2020-01-03    837.0\n",
       "2020-01-04    475.0\n",
       "2020-01-05    758.0\n",
       "              ...  \n",
       "2020-12-26    551.0\n",
       "2020-12-27    633.0\n",
       "2020-12-28    612.0\n",
       "2020-12-29      NaN\n",
       "2020-12-30      NaN\n",
       "Freq: D, Length: 365, dtype: float64"
      ]
     },
     "execution_count": 233,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods=-2) # 数据向前移动"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### 日期移动"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 234,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-06    418\n",
       "2020-01-07    458\n",
       "2020-01-08    480\n",
       "2020-01-09    419\n",
       "2020-01-10    837\n",
       "             ... \n",
       "2020-12-31    809\n",
       "2021-01-01    760\n",
       "2021-01-02    551\n",
       "2021-01-03    633\n",
       "2021-01-04    612\n",
       "Freq: D, Length: 365, dtype: int64"
      ]
     },
     "execution_count": 234,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods=5,freq=pd.tseries.offsets.Day()) # 时间后移；负数，前移"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 235,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2019-08-01    418\n",
       "2019-09-01    458\n",
       "2019-09-01    480\n",
       "2019-09-01    419\n",
       "2019-09-01    837\n",
       "             ... \n",
       "2020-08-01    809\n",
       "2020-08-01    760\n",
       "2020-08-01    551\n",
       "2020-08-01    633\n",
       "2020-08-01    612\n",
       "Length: 365, dtype: int64"
      ]
     },
     "execution_count": 235,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.shift(periods=-5,freq=pd.tseries.offsets.MonthBegin())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### 频率转换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 236,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-31    531\n",
       "2020-02-29    852\n",
       "2020-03-31    376\n",
       "2020-04-30    130\n",
       "2020-05-31    274\n",
       "2020-06-30    809\n",
       "2020-07-31    686\n",
       "2020-08-31    666\n",
       "2020-09-30    952\n",
       "2020-10-31    936\n",
       "2020-11-30    581\n",
       "Freq: M, dtype: int64"
      ]
     },
     "execution_count": 236,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.asfreq(pd.tseries.offsets.MonthEnd()) # 365天，频率转变成月"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 237,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01     418\n",
       "2020-01-08     784\n",
       "2020-01-15     276\n",
       "2020-01-22     978\n",
       "2020-01-29     729\n",
       "2020-02-05     372\n",
       "2020-02-12     983\n",
       "2020-02-19     924\n",
       "2020-02-26     783\n",
       "2020-03-04     420\n",
       "2020-03-11     566\n",
       "2020-03-18     260\n",
       "2020-03-25     526\n",
       "2020-04-01     342\n",
       "2020-04-08      74\n",
       "2020-04-15     705\n",
       "2020-04-22     751\n",
       "2020-04-29     314\n",
       "2020-05-06     853\n",
       "2020-05-13     809\n",
       "2020-05-20     926\n",
       "2020-05-27     899\n",
       "2020-06-03     122\n",
       "2020-06-10     250\n",
       "2020-06-17      34\n",
       "2020-06-24     210\n",
       "2020-07-01     398\n",
       "2020-07-08     755\n",
       "2020-07-15     444\n",
       "2020-07-22     354\n",
       "2020-07-29     423\n",
       "2020-08-05    1000\n",
       "2020-08-12      29\n",
       "2020-08-19     206\n",
       "2020-08-26     364\n",
       "2020-09-02     268\n",
       "2020-09-09      23\n",
       "2020-09-16     426\n",
       "2020-09-23     502\n",
       "2020-09-30     952\n",
       "2020-10-07     909\n",
       "2020-10-14     461\n",
       "2020-10-21     263\n",
       "2020-10-28     211\n",
       "2020-11-04      62\n",
       "2020-11-11     347\n",
       "2020-11-18     944\n",
       "2020-11-25     192\n",
       "2020-12-02     884\n",
       "2020-12-09     978\n",
       "2020-12-16     122\n",
       "2020-12-23     465\n",
       "2020-12-30     612\n",
       "Freq: W, dtype: int64"
      ]
     },
     "execution_count": 237,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.asfreq(pd.tseries.offsets.Week()) # 转变成周"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 238,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01 00:00:00    418\n",
       "2020-01-01 01:00:00      0\n",
       "2020-01-01 02:00:00      0\n",
       "2020-01-01 03:00:00      0\n",
       "2020-01-01 04:00:00      0\n",
       "                      ... \n",
       "2020-12-29 20:00:00      0\n",
       "2020-12-29 21:00:00      0\n",
       "2020-12-29 22:00:00      0\n",
       "2020-12-29 23:00:00      0\n",
       "2020-12-30 00:00:00    612\n",
       "Freq: H, Length: 8737, dtype: int64"
      ]
     },
     "execution_count": 238,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts.asfreq(pd.tseries.offsets.Hour(),fill_value=0) # 时间频率转换从天变换为小时，空数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 239,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "852"
      ]
     },
     "execution_count": 239,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts['2020/02/29']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### 重采样"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 240,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-31    16611\n",
       "2020-02-29    16858\n",
       "2020-03-31    14219\n",
       "2020-04-30    16101\n",
       "2020-05-31    18727\n",
       "2020-06-30    12812\n",
       "2020-07-31    16969\n",
       "2020-08-31    16268\n",
       "2020-09-30    13696\n",
       "2020-10-31    18881\n",
       "2020-11-30    17921\n",
       "2020-12-31    15383\n",
       "Freq: M, dtype: int64"
      ]
     },
     "execution_count": 240,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 时间序列重采样和 之前分组聚合有一拼\n",
    "ts.resample(rule = 'M').agg(np.sum)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 241,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "'DatetimeIndexResampler' object has no attribute 'cumsum'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-241-57b733967b56>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mts\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresample\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrule\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'3M'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcumsum\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/pandas/core/resample.py\u001b[0m in \u001b[0;36m__getattr__\u001b[0;34m(self, attr)\u001b[0m\n\u001b[1;32m    113\u001b[0m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mattr\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    114\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 115\u001b[0;31m         \u001b[0;32mreturn\u001b[0m \u001b[0mobject\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__getattribute__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mattr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    116\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    117\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m__iter__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mAttributeError\u001b[0m: 'DatetimeIndexResampler' object has no attribute 'cumsum'"
     ]
    }
   ],
   "source": [
    "ts.resample(rule = '3M').cumsum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 242,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "module 'numpy' has no attribute 'cum'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-242-87b9b312805d>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcum\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m~/opt/anaconda3/lib/python3.8/site-packages/numpy/__init__.py\u001b[0m in \u001b[0;36m__getattr__\u001b[0;34m(attr)\u001b[0m\n\u001b[1;32m    212\u001b[0m                 \u001b[0;32mreturn\u001b[0m \u001b[0mTester\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    213\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 214\u001b[0;31m                 raise AttributeError(\"module {!r} has no attribute \"\n\u001b[0m\u001b[1;32m    215\u001b[0m                                      \"{!r}\".format(__name__, attr))\n\u001b[1;32m    216\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mAttributeError\u001b[0m: module 'numpy' has no attribute 'cum'"
     ]
    }
   ],
   "source": [
    "np.cum"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 243,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-31     16611\n",
       "2020-04-30     63789\n",
       "2020-07-31    112297\n",
       "2020-10-31    161142\n",
       "2021-01-31    194446\n",
       "Freq: 3M, dtype: int64"
      ]
     },
     "execution_count": 243,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 重采样，就是按季度进行计算\n",
    "ts.resample(rule='3M').agg(np.sum).cumsum()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "hidden": true
   },
   "source": [
    "#### DataFrame重采样"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 244,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>volume</th>\n",
       "      <th>time</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>27</td>\n",
       "      <td>46</td>\n",
       "      <td>2020-09-15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>90</td>\n",
       "      <td>47</td>\n",
       "      <td>2020-09-16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>57</td>\n",
       "      <td>8</td>\n",
       "      <td>2020-09-17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>51</td>\n",
       "      <td>99</td>\n",
       "      <td>2020-09-18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>72</td>\n",
       "      <td>54</td>\n",
       "      <td>2020-09-19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>360</th>\n",
       "      <td>7</td>\n",
       "      <td>90</td>\n",
       "      <td>2021-09-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>361</th>\n",
       "      <td>80</td>\n",
       "      <td>90</td>\n",
       "      <td>2021-09-11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>362</th>\n",
       "      <td>92</td>\n",
       "      <td>22</td>\n",
       "      <td>2021-09-12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>363</th>\n",
       "      <td>61</td>\n",
       "      <td>58</td>\n",
       "      <td>2021-09-13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>364</th>\n",
       "      <td>38</td>\n",
       "      <td>6</td>\n",
       "      <td>2021-09-14</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>365 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     price  volume       time\n",
       "0       27      46 2020-09-15\n",
       "1       90      47 2020-09-16\n",
       "2       57       8 2020-09-17\n",
       "3       51      99 2020-09-18\n",
       "4       72      54 2020-09-19\n",
       "..     ...     ...        ...\n",
       "360      7      90 2021-09-10\n",
       "361     80      90 2021-09-11\n",
       "362     92      22 2021-09-12\n",
       "363     61      58 2021-09-13\n",
       "364     38       6 2021-09-14\n",
       "\n",
       "[365 rows x 3 columns]"
      ]
     },
     "execution_count": 244,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data = {'price':np.random.randint(0,100,size = 365),\n",
    "                          'volume':np.random.randint(0,100,size = 365),\n",
    "                          'time':pd.date_range('2020.09.15',periods=365)})\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 245,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>818</td>\n",
       "      <td>722</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>1424</td>\n",
       "      <td>1386</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>1614</td>\n",
       "      <td>1560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>1618</td>\n",
       "      <td>1420</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>1490</td>\n",
       "      <td>1474</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>1359</td>\n",
       "      <td>1403</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>1279</td>\n",
       "      <td>1478</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>1195</td>\n",
       "      <td>1530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>1526</td>\n",
       "      <td>1618</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>1276</td>\n",
       "      <td>1395</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>1586</td>\n",
       "      <td>1722</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>1744</td>\n",
       "      <td>1787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>823</td>\n",
       "      <td>674</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            price  volume\n",
       "time                     \n",
       "2020-09-30    818     722\n",
       "2020-10-31   1424    1386\n",
       "2020-11-30   1614    1560\n",
       "2020-12-31   1618    1420\n",
       "2021-01-31   1490    1474\n",
       "2021-02-28   1359    1403\n",
       "2021-03-31   1279    1478\n",
       "2021-04-30   1195    1530\n",
       "2021-05-31   1526    1618\n",
       "2021-06-30   1276    1395\n",
       "2021-07-31   1586    1722\n",
       "2021-08-31   1744    1787\n",
       "2021-09-30    823     674"
      ]
     },
     "execution_count": 245,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.resample(rule = 'M',on = 'time').sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 246,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>time</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-09-30</th>\n",
       "      <td>818</td>\n",
       "      <td>722</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-10-31</th>\n",
       "      <td>1424</td>\n",
       "      <td>1386</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-11-30</th>\n",
       "      <td>1614</td>\n",
       "      <td>1560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-12-31</th>\n",
       "      <td>1618</td>\n",
       "      <td>1420</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-01-31</th>\n",
       "      <td>1490</td>\n",
       "      <td>1474</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-02-28</th>\n",
       "      <td>1359</td>\n",
       "      <td>1403</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-03-31</th>\n",
       "      <td>1279</td>\n",
       "      <td>1478</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-04-30</th>\n",
       "      <td>1195</td>\n",
       "      <td>1530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-05-31</th>\n",
       "      <td>1526</td>\n",
       "      <td>1618</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-06-30</th>\n",
       "      <td>1276</td>\n",
       "      <td>1395</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-07-31</th>\n",
       "      <td>1586</td>\n",
       "      <td>1722</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-08-31</th>\n",
       "      <td>1744</td>\n",
       "      <td>1787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-09-30</th>\n",
       "      <td>823</td>\n",
       "      <td>674</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            price  volume\n",
       "time                     \n",
       "2020-09-30    818     722\n",
       "2020-10-31   1424    1386\n",
       "2020-11-30   1614    1560\n",
       "2020-12-31   1618    1420\n",
       "2021-01-31   1490    1474\n",
       "2021-02-28   1359    1403\n",
       "2021-03-31   1279    1478\n",
       "2021-04-30   1195    1530\n",
       "2021-05-31   1526    1618\n",
       "2021-06-30   1276    1395\n",
       "2021-07-31   1586    1722\n",
       "2021-08-31   1744    1787\n",
       "2021-09-30    823     674"
      ]
     },
     "execution_count": 246,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.resample(rule = 'M',on = 'time').apply(np.sum)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 247,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>price</th>\n",
       "      <th>volume</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>818</td>\n",
       "      <td>722</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>818</td>\n",
       "      <td>722</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>818</td>\n",
       "      <td>722</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>818</td>\n",
       "      <td>722</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>818</td>\n",
       "      <td>722</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>360</th>\n",
       "      <td>823</td>\n",
       "      <td>674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>361</th>\n",
       "      <td>823</td>\n",
       "      <td>674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>362</th>\n",
       "      <td>823</td>\n",
       "      <td>674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>363</th>\n",
       "      <td>823</td>\n",
       "      <td>674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>364</th>\n",
       "      <td>823</td>\n",
       "      <td>674</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>365 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     price  volume\n",
       "0      818     722\n",
       "1      818     722\n",
       "2      818     722\n",
       "3      818     722\n",
       "4      818     722\n",
       "..     ...     ...\n",
       "360    823     674\n",
       "361    823     674\n",
       "362    823     674\n",
       "363    823     674\n",
       "364    823     674\n",
       "\n",
       "[365 rows x 2 columns]"
      ]
     },
     "execution_count": 247,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.resample(rule = 'M',on = 'time').transform(np.sum)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据可视化"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "### 线形图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 248,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 248,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD4CAYAAAAJmJb0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAB+bklEQVR4nO2dd3hU1daH3z0z6b1XIBAgdJDeu4ogoIKCvfd+r10/xWvvvSDYFRCwIYIo0pGO9BogQEJ675lyvj/21MykkYQUzvs8eXL62SeZWWfvtdf6LaEoCioqKioqrRNNUzdARUVFRaXxUI28ioqKSitGNfIqKioqrRjVyKuoqKi0YlQjr6KiotKK0TV1A+wJDQ1V4uLimroZKioqKi2KHTt2ZCmKEuZqX7My8nFxcWzfvr2pm6GioqLSohBCnKxqn+quUVFRUWnFqEZeRUVFpRWjGnkVFRWVVoxq5FVUVFRaMfU28kKINkKI1UKIg0KI/UKIB83bg4UQfwkhjpp/B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xVF+cm8Od08hMP8O8O8vaX/LYYBU4QQSUi321ghxHe03ue1kAwkK4qyxby+GGn0W+tzjwdOKIqSqSiKHvgJGErrfd7K1PU5k83LlbfXitZg5LcBnYQQ7YUQ7sBMYEkTt6lBMM+gfw4cVBTlbbtdS4Abzcs3Ar/abZ8phPAQQrQHOiEnbFoEiqI8qShKrKIoccj/4ypFUa6jlT6vBUVR0oDTQogE86ZxwAFa73OfAgYLIbzNn/FxyPmm1vq8lanTc5pdOoVCiMHmv9cNdufUTFPPPjfQDPZEZOTJMeDppm5PAz7XcOSwbA+wy/wzEQgB/gaOmn8H253ztPnvcJg6zMA3tx9gNLbomvPhefsA283/61+AoNb83MDzwCFgH/AtMqKk1T0vMB8576BH9shvPZvnBPqb/1bHgA8xqxXU5keVNVBRUVFpxbQGd42KioqKShWoRl5FRUWlFaMaeRUVFZVWjGrkVVRUVFoxqpFXUVFRacWoRl5FRUWlFaMaeRUVFZVWzP8DcyUTF23NPYoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df1 = pd.DataFrame(np.random.randn(1000,4),columns=list('ABCD'))\n",
    "df1.cumsum().plot() # 表示绘制线"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "### 条形图、柱状图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 249,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 249,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD1CAYAAABA+A6aAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAA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DsykbfDsAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAASSUlEQVR4nO3dfZCdZXnH8e/FJpJEKWAgTkKkm1ReJSXCgoLgYLAV0NEBHQdpCWVsHaZFSG2nhv4hsZ06lOkfaQdbG8FKp5KUiYTaUkGm4UUUaBImmkDAAgZYXkwIypsEwnL1j93EEHazT/Y8zzn3nnw/Mzvs2fOc+1zPIfvLnft5uSIzkSSVa59OFyBJ2j2DWpIKZ1BLUuEMakkqnEEtSYWb0MSgBx10UPb29jYxtCR1pTVr1jybmQcP91wjQd3b28vq1aubGFqSulJEPDbScy59SFLhDGpJKpxBLUmFa2SNWpLabdu2bfT397N169ZOl7JbkyZNYubMmUycOLHyaxoJ6q3r72fDkUc1MbT0Jkc9uKHTJagQ/f397LfffvT29hIRnS5nWJnJli1b6O/vZ9asWZVf59KHpK6wdetWpk6dWmxIA0QEU6dO3eNZf6WgjohLI2J9RNwfEQvGUqAkNa3kkN5uLDWOuvQREccAfwScCLwG3BwRN2Xm/430mkemw2cuc/lbsO6CdZ0uQRr3qqTpUcA9mfkrgIi4AzgbuLLJwiSpFb0Lb6p1vI1XfKzSditWrOCcc85hw4YNHHnkkbW8d5WgXg/8TURMBV4BzgLectlhRHwe+DzAofsH6372eC0FdtSi5ztdgaRxZunSpZxyyiksW7aMRYsW1TLmqGvUmbkB+FvgVuBm4MfA68NstyQz+zKz7+Ap5a8TSVLdXnrpJX74wx9yzTXXsGzZstrGrXQwMTOvyczjMvNDwHPAiOvTkrS3uvHGGznjjDM4/PDDeec738l9991Xy7iVjvhFxLTM3BQRhwLnACftbvt1OZverYtrKK/Dal7jkrR7VdeBS7V06VIWLFgAwLnnnsvSpUs57rjjWh636qkZ3xlao94G/Elm/qLld5akLrJlyxZWrlzJ+vXriQgGBgaICK688sqWTxusuvRxamYenZnHZub/tPSOktSFli9fzvz583nsscfYuHEjTzzxBLNmzeKuu+5qeexGTnaec8j+rB7n/4SRNL61exll6dKlLFy48E0/+9SnPsV1113Hqaee2tLYXpUiSTW4/fbb3/KzSy65pJaxvdeHJBXOoJakwhnUklQ4g1qSCmdQS1LhDGpJKpyn50nqTov2r3m80e+m2dPTw5w5c8hMenp6uOqqqzj55JNbfmuDWpJqMnnyZNauXQvALbfcwmWXXcYdd9zR8rgufUhSA1544QUOPPDAWsayC7kaZ6dw7S1eeeUV5s6dy9atW3n66adZuXJlLeO69CFJNdl56ePuu+9m/vz5O+6m14qq96P+U+APgQTWARdm5oj9zm1u2zqbwkrj20knncSzzz7L5s2bmTZtWktjjbpGHRGHAJcAfZl5DNADnNvSu0pSl3vwwQcZGBhg6tSpLY9Vddo7AZgcEduAKcBTLb+zJDWpA82pt69RA2Qm1157LT09PS2PO2pQZ+aTEfF3wOMMdiH/fmZ+f9fturILeSfVfQ6o9m4dCK290cDAQCPjVln6OBD4JDALmAG8PSJ+f9ft7EIuSc2och71R4CfZebmzNwG3AC0fqmNJKmSKmvUjwMfiIgpDC59nA6s3t0LuqYLudQm4737tpo16ow6M+8FlgP3MXhq3j7AkobrkiQNqXTWR2ZeDlxedVCb20pSfbzXhyQVzssHJXWlOdfOqXW8KlcLP/PMMyxYsIBVq1ax77770tvby+LFizn88MNbem9n1JJUg8zk7LPP5rTTTuORRx7hgQce4Ktf/So///nPWx7bGbUk1eC2225j4sSJXHTRRTt+tv0qxVY5o5akGqxfv57jjz++kbENakkqnEEtSTV473vfy5o1axoZ26CWpBrMmzePV199lW984xs7frZq1apaeiZ6MFFSV2p3842IYMWKFSxYsIArrriCSZMm7Tg9r1UGtSTVZM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ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df2 = pd.DataFrame(np.random.rand(10,4),columns=list('ABCD'))\n",
    "df2.plot.bar(stacked = True) # 柱状图\n",
    "df2.plot.barh()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "### 饼图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 250,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([<AxesSubplot:ylabel='one'>, <AxesSubplot:ylabel='two'>],\n",
       "      dtype=object)"
      ]
     },
     "execution_count": 250,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPUAAADnCAYAAADGrxD1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAYkUlEQVR4nO3deZRcZZ3G8e+vektnK7JBVpIQlhRJZSNAQlCCwqACOTjEBRwtl1GPio6jyLhzHT3KOBjCKALi1uIoqwLniCAjhlUExJBLqCIQsrEJWagE6eruqnrnj1uNISbd1d1V96373t/nnD7pNJW6T0I/fbf3fa8YY1BKuSNhO4BSqra01Eo5RkutlGO01Eo5RkutlGO01Eo5RkutlGO01Eo5RkutlGO01Eo5RkutlGO01Eo5RkutlGO01Eo5RkutlGO01I4RkZKIrBWRR0XkERE5wXYmFS7RRRLcIiKvGGNGVj4/DfiiMeYky7FUiHRP7bbRwC7bIVS4mm0HUDXXLiJrgWHAJOBNduOosOnht2P2OfxeCvwQmGv0f3Rs6OG3w4wxfwTGAxNsZ1Hh0VI7TERmA03ADttZVHj0nNo9vefUAAJkjDEli3lUyPScWinH6OG3Uo7RUivlGC21U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IO9H37G3243UrxoqSMs3ZEeAywmKPh8gottRwCtIUXoBB7h9QXWc2PLtNSOqVxRP5yg4LOBccBoYFTl1/193rLXW5QIFunbXvnYsdfne39tG7Dez/i6KGOD0VKr3vvmowlWTd1VeaiBiigttVKOiessLaWcpaVWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUco6VWyjFaaqUc8/+K8syEbYewegAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkoAAAEMCAYAAAA7ypl1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABPk0lEQVR4nO3deZxbVf3/8ddJMntn7nSb7u10b0pDC2Vpocoii1D2VRAdQcENBFGx6E8IglJURBZFZR2rCLLzpYgICAXKTpdAkxbaTvd9mc6WZJKc3x93utFOJzOT5Nwkn+fjkQftNPfe95TOyeeeexaltUYIIYQQQuzLZTqAEEIIIYRTSaEkhBBCCNEOKZSEEEIIIdohhZIQQgghRDukUBJCCCGEaIcUSkIIIYQQ7ZBCSQghhBCiHVIoCSGEEEK0QwolIYQQQoh2SKEkhBBCCNEOKZSEEEIIIdrhMR1ACAEffvhhlcfjuR+YgLNvYBLAx7FY7FuTJ0/eaDqMEMK8XG+/pFASwgE8Hs/9/fv39/bt23eby+Vy7E7ViURCbdq0afz69evvB84wnUcIYV6ut19OrvyEyCcT+vbtu8PJjQyAy+XSffv2rce+cxRCCMjx9ksKJSGcweX0RmantpzSdgghdsrp9ksaOyHELn/7298qlVKT582bV2w6ixBCdF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8BcbyjYbDiTSJIUSnnKV+sbgb0x72TsGXQ+nLM43FbgI+zC6D3gPXmcJoTYyVfrK8Zuu6YCRwITgJE4o3jagT3O6OO21zvAvEBNoNVoKtFlUiiJXXy1vj7YDc4IYBj247phba/BpG7MUwR7uuta4NM9Xp8BnwZqAltTdB0hRJ5oG+M0AnsrlbFt/x0OVAH9sBd8TMXjuziwAViD3YatAZbTVhwFagIyfT/HSKEkktI2ZqA3YAEVba/yPX7txm5APv9qBbZhF0ZbgM2BmkBjpvMLIfJbWyHVF7to6guUYt/8FbX9d+dLAc37eTUB64ENgZpAPNP5hTlSKAkhhBBCtMNlOoAQQgghhFNJoSSEEEII0Q4plIQQQggh2iGFkhBCCCFEO6RQEkIIIYRohxRKQgghhBDtkEJJCCGEEKIdUigJIYQQQrRDCiUhhBBCiHZIoSSEEEII0Q4plIQQQggh2iGFkhBCCCFEO6RQEkIIIYRohxRKQgghhBDtkEJJCCGEEKIdUigJIYQQQrRDCiUhhBBCiHZIoSSEEEII0Q4plIQQQggh2iGFkhBCCCFEO6RQEkIIIYRohxRKQgghhBDtkEJJCCGEEKIdUigJIYQQQrRDCiUhhBBCiHZIoSSEEEII0Q4plIQQQggh2iGFkhBCCCFEO6RQEkIIIYRohxRKQgghhBDtkEJJCCGEEKId/x96wE9/4xrDmwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 720x720 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df3 = pd.DataFrame(np.random.rand(4,2),columns=['one','two'],index = list('ABCD'))\n",
    "df3['one'].plot.pie()\n",
    "df3.plot.pie(subplots = True,figsize = (10,10),autopct = '%0.2f%%')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "### 散点图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 251,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:xlabel='A', ylabel='B'>"
      ]
     },
     "execution_count": 251,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEGCAYAAABsLkJ6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAX3ElEQVR4nO3dbYzcV3XH8d/xZmOnOCSRnRYSe2Mk85SgPMCKpFrUikDVkEIoEBAhQVVB9ZtGAgkU00YIVbwyUF6UIFELEIqEgCCT2gUKDXIqmggi1nRtOXEDKRX1GgTBJCQOydrePX2xu9mn2dmZ2f99+t/vR4pi7yYzd2Zn77n3nPO/f3N3AQDqsyH1AAAAaRAAAKBSBAAAqBQBAAAqRQAAgEqdk3oA/di6davv2LEj9TAAoCiHDh36jbtfvPzrRQWAHTt2aHx8PPUwAKAoZvbzTl8nBQQAlSIAAEClCAAAUCkCAABUigAAAJUiAACJnTw1pcPHn9TJU1Oph4LKFNUGCrTN/okT2r3viIY3bNCZmRl94h1X6qarL009LFSCHQCQyMlTU9q974ieOzOjp6fO6rkzM7pj3xF2AoiGAAAkMvnEsxresPRXcHjDBk0+8WyiEaE2BAAgkW0XnaczMzNLvnZmZkbbLjov0YhQGwIAkMiWzRv1iXdcqU3DG3T+xnO0aXiDPvGOK7Vl88bUQ0MlKAIDgZ08NaXJJ57VtovOWzG533T1pRrbuXXV7wMhEQCAgHrp8tmyeSMTP5IgBQQEQpcPckcAAAKhywe5IwAAgdDlg9wRAIBA6PJB7igCAwHR5YOcEQCAwOjyQa5IAQFApQgAAFApAgAAVIoAAACVShYAzGy7md1vZsfM7GEz+0CqsQBAjVJ2AZ2V9CF3/7GZnS/pkJnd5+6PJBwTAFQj2Q7A3X/p7j+e+/PTko5J4l54ANaN+yz3JovrAMxsh6RrJD3U4Xu7JO2SpJGRkbgDA1Ac7rPcu+RF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mX0k9XhiM7Mvmtmvzexo6rGkYGbbzex+Mzs29zvwgZjPTwDIQ+13SDsq6e2Svp96IDGZ2ZCkz0p6k6TLJd1iZpenHVV0X5J0Q+pBJHRW0ofc/ZWSrpP0tzE/AwSADNR+hzR3P+buj6YeRwKvlfSYu//M3U9L+qqktyYeU1Tu/n1Jv009jlTc/Zfu/uO5Pz8t6ZikS2M9PwEgP++T9G+pB4EoLpV0fNHfJxXxlx95MbMdkq6R9FCs58zhlpBVaOoOaaXq5fVXyDp8jb7sCpnZZkn7JH3Q3Z+K9bwEgEhqv0PaWq+/UpOSti/6+zZJv0g0FiRiZsOanfy/7O7fiPncpIAysOgOaTdxh7Sq/EjSS83sJWZ2rqR3SzqQeEyIyMxM0hckHXP3T8d+fgJAHqq+Q5qZvc3MJiX9saRvmdl3U48phrnC/+2SvqvZ4t897v5w2lHFZWZfkfQDSS83s0kze3/qMUU2Jum9kq6f+92fMLMbYz05R0EAQKXYAQBApQgAAFApAgAAVIoAAACVIgAAQKUIAMA6zbWxupm9IvVYgH4QAID1u0XSA5q9kAsoBtcBAOswd4bLo5JeL+mAu7MLQDHYAQDr85eSvuPuP5H0WzN7deLxAD0jAADrc4tmz/HX3L9vSTgWoC+kgIABmdkWzZ7o+WvNHuM8NPfvy9p4oivahx0AMLibJd3t7pe5+w533y7pfyW9LvG4gJ4QAIDB3SLp3mVf2yfpPQnGAvSNFBAAVIodAABUigAAAJUiAABApQgAAFApAgAAVIoAAACVIgAAQKX+Hw0dOWID6xywAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 表示两个属性之间的关系\n",
    "df4 = pd.DataFrame(np.random.randn(100,4),columns=list('ABCD'))\n",
    "df4.plot.scatter(x = 'A',y = 'B')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 252,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:xlabel='B', ylabel='D'>"
      ]
     },
     "execution_count": 252,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEGCAYAAABsLkJ6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABuYElEQVR4nO2dd5hdVbm433V6md57Sy+kJySEFiCFFrqKKHCBG+woXht6bfeKIsrv6gVBLqgoGhSkSUlIgUBCCOm9T6Zl2pl2Zs6cfvb6/XEyh0ym1zOTWa+Pz0P22eXbe/Ze31pfFVJKFAqFQjH20EVbAIVCoVBEB6UAFAqFYoyiFIBCoVCMUZQCUCgUijGKUgAKhUIxRjFEW4C+kJKSIgsKCqIthkKhUIwqdu7cWSelTD13+6hSAAUFBezYsSPaYigUCsWoQghR2tl2ZQJSKBSKMYpSAAqFQjFGUQpAoVAoxiijygegUCjGNoFAgIqKCrxeb7RFGZFYLBZycnIwGo292j9qCkAIYQHeB8xn5HhJSvmjaMmjUChGPhUVFcTGxlJQUIAQItrijCiklNTX11NRUUFhYWGvjommCcgHXCGlnAnMAlYIIRZGUR5FlHE43GzfXoXD4Y62KIoRitfrJTk5WQ3+nSCEIDk5uU+ro6gpABnGdeafxjP/V6VJxyirVx8mP/9pli59kfz8p1m9+nC0RVKMUNTg3zV9fTZRdQILIfRCiD1ALbBOSrktmvIoooPD4ebee9fi8QRxOv14PEHuvXetWgkoFENMVBWAlDIkpZwF5AALhBDTz91HCLFKCLFDCLHD4XAMu4yKoaekxInJ1P5VNBp1lJQ4oySRQtE9NTU1fPazn6WoqIi5c+eyaNEiXnnllSG95uOPP8748eMRQlBXVzco5xwRYaBSyibgPWBFJ789LaWcJ6Wcl5raIZNZcR5QUBCP36+12xYIaBQUxEdJIoWia6SU3HjjjVx66a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dUCUigGhlUIsQewAJnAFdEVR6HoPcoEpFAMgHNMQIuAZwg3+VEflmLEo0xACsUgIaXcCqQAqdGWRaHoDUoBKBSDhBBiMqAH6qMti0LRG5QPQKEYGG0+AAg3gblLShmKojwKRa9RPgCFQqEYoygTkEKhUIxRlAJQKBSKMYpSAAqFQjFGUQpAoVAoxihKASgUCsUYRSkAhUKhGKMoBaBQKBRjlP8PMP8RaplYcV8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 一张图显示，A和C关系，同时显示B和D关系\n",
    "# 返回值，视图\n",
    "ax = df4.plot.scatter(x = 'A',y = 'C',color = 'DarkBlue',label = 'Group1')\n",
    "\n",
    "# 再次向ax中绘制图形\n",
    "df4.plot.scatter(x = 'B',y = 'D',color = 'DarkGreen',label = 'Group2',\n",
    "                 alpha = 0.5,#透明度\n",
    "                 s = np.random.randint(30,100,size = 100), # 大小各不相同\n",
    "                 ax = ax) # 表示向子视图ax中继续进行绘制"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "### 面积图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 253,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 253,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABWy0lEQVR4nO2dd3wUdfrH38/sbnqD0HuRLoIIIiDFenZ+ds8721nOXs9+9jvbFeupZzs72NBTD7tiRWmi0jskkJCeT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Lj5TSrXLUVhTUEoVAnkiMqzuR4cAK2IYUizZAhwgIml198whtNMJ4oRagm5PbQhiHFYsmQKcAfwsIkvrfnaTUmpu7ELSxBGXAS/XDX42EP2WHHGJUup7EXkDWILjDPuBdtoCQJf+azQaTTsh0VIuGo1Go9kDWtA1Go2mnaAFXaPRaNoJWtA1Go2mnaAFXaPRaNoJWtA1Go2mnaAFXaPRaNoJ/w+Y6BW5VCZFCQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df5 = pd.DataFrame(np.random.rand(10,4),columns=list('ABCD'))\n",
    "df5.plot.area(stacked = True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "### 箱式图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 254,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:>"
      ]
     },
     "execution_count": 254,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAD4CAYAAADxeG0DAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAM00lEQVR4nO3df4gk+VnH8c/HcdSDOyO4E06S40ZRSYdOjGEUYhpix6CnBvQkQlqQQJrsXxkMBnIb+4/TPxrvEEJgIxwDHUwk9inEI5I7k1xiQ9L+wtljI9m0hhhzeCi5iZEk4h3Ono9/7OzOzmZ2pme6br79VL1f0DBT3Vv1UFP7me889a0qR4QAAHl9V+kCAACLIcgBIDmCHACSI8gBIDmCHACS++4SGz137lysr6+X2DQApHXp0qWvR8TarcuLBPn6+rq2t7dLbBoA0rL99GHLaa0AQH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17As2Bf72Bf72Bf7lmVf3BsRa7cuLBLky8D2dkRslK5jGbAv9rEv9rEv9i37vqC1AgDJEeQAkFyTg3yrdAFLhH2xj32xj32xb6n3RWN75ABQF00ekQNALRDkAJBcI4Pc9v22w/YrStdSku0XbF+2/XnbT9n+mdI1lWL7btuP2v4X21+0/YTtHy9d11m76Zi4sndc/LbtRuaEdGB/XH9dKF3TYRrZI7f9Z5J+SNJnIuJ3C5dTjO3/jog7977+BUm/ExFvKFzWmfO157/9jaQPRcQje8teI+muiPhcydrO2i3HxEsl/Ymkv46IB8tWVsbN+2OZNe43re07Jb1eUl/SWwuXs0y+X9J/lS6ikK6k3eshLkkRcblpIX6riHhW0nlJ7/Q8DztFMU18ZuevSvpERHzJ9jdsvzYinipdVCF32L4s6ft07S+UN5Ytp5i2pEuli1hGEfGVvdbKSyV9rXQ9BVz/P3Ld70fEn5Yq5naaGOQ9Se/f+/rRve+bGuTPRcRrJMn26yR92HY7mthvw1GaPBq/8X9kmTUqyG3/oK6NOtu2Q9KKpLD9nqaHV0T8re1zktYkPVu6njN2RdJbShexjGz/iKQX1LxjIpWm9cjfIunDEXFvRKxHxD2S/lVSp3Bdxe3N4FmR9J+layngryR9r+13XF9g+6dsN+7E781sr0l6RNIHmj7QWXaNGpHrWhvloVuWfVTSb0hq4omtm/t/lvS2iHihYD1FRETYvl/S+/emlz0v6auS3lWyrkKuHxOrkq5K+mNJ7ytaUVm39sg/ERFLNwWxkdMPAaBOmtZaAYDaIcgBIDmCHACSI8gBIDmCHACSI8gBIDmCHACS+38YOWgDeG8IAgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 特殊的条形图，表示数据分布情况\n",
    "df6 = pd.DataFrame(np.random.randn(20,5),columns=list('ABCDE'))\n",
    "df6.plot.box() # 绿色线表示中位数，上四分之一，下四分之一，表示异常值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 255,
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>E</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>20.00</td>\n",
       "      <td>20.00</td>\n",
       "      <td>20.00</td>\n",
       "      <td>20.00</td>\n",
       "      <td>20.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>0.06</td>\n",
       "      <td>0.23</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.20</td>\n",
       "      <td>0.36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.93</td>\n",
       "      <td>0.71</td>\n",
       "      <td>1.03</td>\n",
       "      <td>0.93</td>\n",
       "      <td>0.91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>-1.69</td>\n",
       "      <td>-1.50</td>\n",
       "      <td>-2.49</td>\n",
       "      <td>-1.28</td>\n",
       "      <td>-1.52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>-0.62</td>\n",
       "      <td>-0.04</td>\n",
       "      <td>-0.70</td>\n",
       "      <td>-0.28</td>\n",
       "      <td>-0.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>0.14</td>\n",
       "      <td>0.21</td>\n",
       "      <td>0.14</td>\n",
       "      <td>0.31</td>\n",
       "      <td>0.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>0.87</td>\n",
       "      <td>0.54</td>\n",
       "      <td>0.86</td>\n",
       "      <td>0.54</td>\n",
       "      <td>0.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>1.60</td>\n",
       "      <td>1.55</td>\n",
       "      <td>1.84</td>\n",
       "      <td>2.36</td>\n",
       "      <td>2.62</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           A      B      C      D      E\n",
       "count  20.00  20.00  20.00  20.00  20.00\n",
       "mean    0.06   0.23   0.10   0.20   0.36\n",
       "std     0.93   0.71   1.03   0.93   0.91\n",
       "min    -1.69  -1.50  -2.49  -1.28  -1.52\n",
       "25%    -0.62  -0.04  -0.70  -0.28  -0.43\n",
       "50%     0.14   0.21   0.14   0.31   0.53\n",
       "75%     0.87   0.54   0.86   0.54   0.90\n",
       "max     1.60   1.55   1.84   2.36   2.62"
      ]
     },
     "execution_count": 255,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df6.describe().round(2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 直方图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 256,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<AxesSubplot:ylabel='Frequency'>"
      ]
     },
     "execution_count": 256,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAD4CAYAAAAD6PrjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAA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I+Jw0fVUm6T3AAcjYpOkCwsuJxcOhToQEW+r1C5pDtAO/EISlA6pbJY0LyJ+VcMSq+Jkv3OQpEXAe4CLYvRcQDNmbt0iaRylQPh2RHy/6Hpycj5wiaR3Ac3ASyV9KyI+VHBdVeOL1xqIpD1AR0SMujtQSloAfBG4ICL6i66nWiS9kNKJ84uApyjdyuWDo+1KfZX+1dIF/DoilhZcTk0kI4VPRcR7Ci6lqnxOwerFDcAEYL2kLZK+UnRB1ZCcPB+8dctOoGe0BULifODDwPzkv9+W5F/T1mA8UjAzs5RHCmZmlnIomJlZyqFgZmYph4KZmaUcCmZmlnIomJlZyqFgZmap/wfgc64KIe1a5QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAD4CAYAAAAD6PrjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAXPklEQVR4nO3de5AVZ53G8e/jiExUrACZRMKAM2uBEbwQM+IlaiJRg7eQ6OpOdjXsmg1ai5VQq4UQt9ZsbVGVwkuybtYLMSnxkhnHKAmbUiO5VywNDAQjt2woQ8IEhAlqYTQQGX/7x+lpT+Aw9GROnz5n5vlUUaf7Pf12/45WeHi73+5WRGBmZgbwvKILMDOz+uFQMDOzlEPBzMxSDgUzM0s5FMzMLPX8ogsYiVNOOSXa2tqKLsPMrKFs3LjxyYhoqfRdQ4dCW1sbvb29RZdhZtZQJD12vO98+sjMzFIOBTMzSzkUzMws1dDXFMzMivDnP/+Zvr4+Dh06VHQpQ2pubqa1tZVx48Zl7uNQMDMbpr6+PiZMmEBbWxuSii6noojgwIED9PX10d7enrlf7qePJDVJelDSbcn6JEnrJD2SfE4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plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 表示概率，分布，一种形式的条形图\n",
    "df7 =pd.DataFrame(data = {'A':np.random.randn(1000) - 2,\n",
    "                          'B':np.random.randn(1000),\n",
    "                          'C':np.random.randn(1000) + 2})\n",
    "df7.plot.hist()\n",
    "df7.plot.hist(stacked = False,alpha = 0.65) # 堆叠效果"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 257,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[<AxesSubplot:title={'center':'A'}>,\n",
       "        <AxesSubplot:title={'center':'B'}>],\n",
       "       [<AxesSubplot:title={'center':'C'}>, <AxesSubplot:>]], dtype=object)"
      ]
     },
     "execution_count": 257,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiAAAAIYCAYAAABUoFfcAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAmDElEQVR4nO3df5Bd513f8fcHOwRjhfyoyaLIKus/HCYOAmfYcemYDmsM2MQpMjNN6mASu0kRfzgloWJADjMlU0atW7BDCwRQSCZmcBBqk9QeFH44nixppnEc2xgUWZioWCSyhU2Im3gzEGaVb//Yu+GiSNqr3XOf++v9mtHsuc8959zvo3Pv3c99znPPpqqQJElq6WtGXYAkSZo9BhBJktScAUSSJDVnAJEkSc0ZQCRJUnMGEEmS1JwBRJIkNWcA0TlLspTkmSTPHXUtkqZTkmNJ/jbJcu/95mCS7aOuS90xgOicJJkH/gVQwA+OthpJU+5fVtUWYCvwFPBLI65HHTKA6Fy9HrgfeA9w02hLkTQLqurvgP8JXDbqWtSd80ddgCbO64E7gI8D9yeZq6qnRlyTpCmW5OuBf83qhx9NCQO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jIFW1kuRNwB8A5wHvrqrDw3gsSZI0eYZ2IbKq+iDwwQ1s+lWnZaaU/Zwus9JPSepEqmr9tSRJkjrkH6OTJEnNjWUASfLzSf4syZ8m+UCSF4y6pq7MwiXqk2xP8uEkR5IcTvLmUdc0TEnOS/LHSX531LVI0qQYywAC3At8a1V9G/DnwK0jrqcTfZeo/wHgMuC1SS4bbVVDsQLsrqqXAd8J3DKl/VzzZuDIqIuQpEkylgGkqv6wqlZ6N+9n9Toi02AmLlFfVSeq6uHe8rOs/nKeyivhJrkYuA74jVHXIkmTZCwDyCneAPzeqIvoyMxdoj7JPPAK4OMjLmVYfhH4KeDLI65DkibK0L6Gu54kHwK+6TR3/UxV3d1b52dYHc6/q2VtQ7TuJeqnSZItwPuAt1TVF0ZdT9eSvAp4uqoeSrI44nIkaaKMLIBU1fee7f4kNwGvAq6u6fmu8LqXqJ8WSZ7Davi4q6reP+p6huRK4AeTvBL4OuAbkvxWVf3IiOuSpLE3ltcBSXItcAfw3VX116OupytJzmd1Uu3VwBOsXrL+h6ftKrFJAtwJfK6q3jLicprojYD8ZFW9asSlSNJEGNc5IL8MPA+4N8kjSX5t1AV1oTexdu0S9UeAA9MWPnquBF4HfE/v+D3SGyWQJAkY0xEQSZI03cZ1BESSJE0xA4gkSWrOACJJkpozgEiSpOYMIJIkqTkDiCRJas4AIkmSmjOASJKk5v4/13gpj1/9+oAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 648x648 with 4 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 子视图的直方图\n",
    "df7.hist(figsize = (9,9)) # 3个属性各绘制了直方图"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 实战-拉勾网数据分析师招聘数据分析"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 加载、查看、去重"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 258,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 259,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(3683, 12)"
      ]
     },
     "execution_count": 259,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job = pd.read_csv('./lagou2020.csv')\n",
    "job.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 260,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>positionName</th>\n",
       "      <th>companyShortName</th>\n",
       "      <th>city</th>\n",
       "      <th>companySize</th>\n",
       "      <th>education</th>\n",
       "      <th>financeStage</th>\n",
       "      <th>industryField</th>\n",
       "      <th>salary</th>\n",
       "      <th>workYear</th>\n",
       "      <th>hitags</th>\n",
       "      <th>companyLabelList</th>\n",
       "      <th>job_detail</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>拉勾网</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>本科</td>\n",
       "      <td>D轮及以上</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>25k-35k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>[\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...</td>\n",
       "      <td>[\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]</td>\n",
       "      <td>\\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>数据分析师</td>\n",
       "      <td>OK Group</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>B轮</td>\n",
       "      <td>金融</td>\n",
       "      <td>25k-45k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]</td>\n",
       "      <td>\\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>数据分析师</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>电商</td>\n",
       "      <td>15k-30k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>[\"免费班车\",\"免费体检\",\"地铁周边\"]</td>\n",
       "      <td>[\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]</td>\n",
       "      <td>\\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  positionName companyShortName city companySize education financeStage  \\\n",
       "0      高级数据分析师              拉勾网   北京   500-2000人        本科        D轮及以上   \n",
       "1        数据分析师         OK Group   北京   500-2000人        大专           B轮   \n",
       "2      高级数据分析师           金山办公软件   北京     2000人以上        本科         上市公司   \n",
       "3        数据分析师           金山办公软件   北京     2000人以上        本科         上市公司   \n",
       "4        数据分析师             京东集团   北京     2000人以上        本科         上市公司   \n",
       "\n",
       "  industryField   salary workYear  \\\n",
       "0          企业服务  25k-35k    5-10年   \n",
       "1            金融  25k-45k    5-10年   \n",
       "2         移动互联网  15k-25k     3-5年   \n",
       "3         移动互联网  15k-25k     1-3年   \n",
       "4            电商  15k-30k     3-5年   \n",
       "\n",
       "                                              hitags  \\\n",
       "0  [\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...   \n",
       "1                                                NaN   \n",
       "2                                                NaN   \n",
       "3                                                NaN   \n",
       "4                             [\"免费班车\",\"免费体检\",\"地铁周边\"]   \n",
       "\n",
       "                companyLabelList  \\\n",
       "0  [\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]   \n",
       "1   [\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]   \n",
       "2  [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "3  [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "4  [\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]   \n",
       "\n",
       "                                          job_detail  \n",
       "0  \\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...  \n",
       "1  \\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...  \n",
       "2  \\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...  \n",
       "3  \\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...  \n",
       "4  \\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...  "
      ]
     },
     "execution_count": 260,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 261,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['北京', '上海', '深圳', '广州', '杭州', '成都', '南京', '武汉', '西安', '厦门', '长沙',\n",
       "       '苏州', '天津'], dtype=object)"
      ]
     },
     "execution_count": 261,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.city.unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 262,
   "metadata": {},
   "outputs": [],
   "source": [
    "job.drop_duplicates(inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 263,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(3507, 12)"
      ]
     },
     "execution_count": 263,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 264,
   "metadata": {},
   "outputs": [],
   "source": [
    "job.reset_index(inplace=True) # 行索引重置：0~最后，从0开始编号"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 265,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>index</th>\n",
       "      <th>positionName</th>\n",
       "      <th>companyShortName</th>\n",
       "      <th>city</th>\n",
       "      <th>companySize</th>\n",
       "      <th>education</th>\n",
       "      <th>financeStage</th>\n",
       "      <th>industryField</th>\n",
       "      <th>salary</th>\n",
       "      <th>workYear</th>\n",
       "      <th>hitags</th>\n",
       "      <th>companyLabelList</th>\n",
       "      <th>job_detail</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>拉勾网</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>本科</td>\n",
       "      <td>D轮及以上</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>25k-35k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>[\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...</td>\n",
       "      <td>[\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]</td>\n",
       "      <td>\\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>OK Group</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>B轮</td>\n",
       "      <td>金融</td>\n",
       "      <td>25k-45k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]</td>\n",
       "      <td>\\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>电商</td>\n",
       "      <td>15k-30k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>[\"免费班车\",\"免费体检\",\"地铁周边\"]</td>\n",
       "      <td>[\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]</td>\n",
       "      <td>\\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3502</th>\n",
       "      <td>3678</td>\n",
       "      <td>内容运营高级经理-审核方向</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>20k-30k</td>\n",
       "      <td>不限</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、负责字节跳动旗下产品图文类及小视频类内容的业务管理，对...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3503</th>\n",
       "      <td>3679</td>\n",
       "      <td>质检岗位基层管理岗</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>6k-10k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、负责对日常业务数据进行分析、挖掘潜在隐患风险、提出风险...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3504</th>\n",
       "      <td>3680</td>\n",
       "      <td>高级审核编辑</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>8k-12k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、根据审核标准，对自媒体发布的国内热点、新闻、优质内容做...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3505</th>\n",
       "      <td>3681</td>\n",
       "      <td>数据运营分析专员</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>6k-8k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、协助数据分析团队项目的测试及开展，了解公司各部门的组织...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3506</th>\n",
       "      <td>3682</td>\n",
       "      <td>数据运营分析实习生</td>\n",
       "      <td>字节跳动</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>C轮</td>\n",
       "      <td>文娱丨内容</td>\n",
       "      <td>2k-3k</td>\n",
       "      <td>不限</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]</td>\n",
       "      <td>\\n        职位职责：\\n1、协助数据分析团队项目的测试及开展，了解公司各部门的组织...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3507 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      index   positionName companyShortName city companySize education  \\\n",
       "0         0        高级数据分析师              拉勾网   北京   500-2000人        本科   \n",
       "1         1          数据分析师         OK Group   北京   500-2000人        大专   \n",
       "2         2        高级数据分析师           金山办公软件   北京     2000人以上        本科   \n",
       "3         3          数据分析师           金山办公软件   北京     2000人以上        本科   \n",
       "4         4          数据分析师             京东集团   北京     2000人以上        本科   \n",
       "...     ...            ...              ...  ...         ...       ...   \n",
       "3502   3678  内容运营高级经理-审核方向             字节跳动   天津     2000人以上        本科   \n",
       "3503   3679      质检岗位基层管理岗             字节跳动   天津     2000人以上        本科   \n",
       "3504   3680         高级审核编辑             字节跳动   天津     2000人以上        本科   \n",
       "3505   3681       数据运营分析专员             字节跳动   天津     2000人以上        本科   \n",
       "3506   3682      数据运营分析实习生             字节跳动   天津     2000人以上        本科   \n",
       "\n",
       "     financeStage industryField   salary workYear  \\\n",
       "0           D轮及以上          企业服务  25k-35k    5-10年   \n",
       "1              B轮            金融  25k-45k    5-10年   \n",
       "2            上市公司         移动互联网  15k-25k     3-5年   \n",
       "3            上市公司         移动互联网  15k-25k     1-3年   \n",
       "4            上市公司            电商  15k-30k     3-5年   \n",
       "...           ...           ...      ...      ...   \n",
       "3502           C轮         文娱丨内容  20k-30k       不限   \n",
       "3503           C轮         文娱丨内容   6k-10k     3-5年   \n",
       "3504           C轮         文娱丨内容   8k-12k     3-5年   \n",
       "3505           C轮         文娱丨内容    6k-8k     3-5年   \n",
       "3506           C轮         文娱丨内容    2k-3k       不限   \n",
       "\n",
       "                                                 hitags  \\\n",
       "0     [\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...   \n",
       "1                                                   NaN   \n",
       "2                                                   NaN   \n",
       "3                                                   NaN   \n",
       "4                                [\"免费班车\",\"免费体检\",\"地铁周边\"]   \n",
       "...                                                 ...   \n",
       "3502                                                NaN   \n",
       "3503                                                NaN   \n",
       "3504                                                NaN   \n",
       "3505                                                NaN   \n",
       "3506                                                NaN   \n",
       "\n",
       "                       companyLabelList  \\\n",
       "0         [\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]   \n",
       "1          [\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]   \n",
       "2         [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "3         [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "4         [\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]   \n",
       "...                                 ...   \n",
       "3502  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "3503  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "3504  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "3505  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "3506  [\"扁平管理\",\"弹性工作\",\"大厨定制三餐\",\"就近租房补贴\"]   \n",
       "\n",
       "                                             job_detail  \n",
       "0     \\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...  \n",
       "1     \\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...  \n",
       "2     \\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...  \n",
       "3     \\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...  \n",
       "4     \\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...  \n",
       "...                                                 ...  \n",
       "3502  \\n        职位职责：\\n1、负责字节跳动旗下产品图文类及小视频类内容的业务管理，对...  \n",
       "3503  \\n        职位职责：\\n1、负责对日常业务数据进行分析、挖掘潜在隐患风险、提出风险...  \n",
       "3504  \\n        职位职责：\\n1、根据审核标准，对自媒体发布的国内热点、新闻、优质内容做...  \n",
       "3505  \\n        职位职责：\\n1、协助数据分析团队项目的测试及开展，了解公司各部门的组织...  \n",
       "3506  \\n        职位职责：\\n1、协助数据分析团队项目的测试及开展，了解公司各部门的组织...  \n",
       "\n",
       "[3507 rows x 13 columns]"
      ]
     },
     "execution_count": 265,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 过滤非数据分析岗位"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 266,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0        True\n",
       "1        True\n",
       "2        True\n",
       "3        True\n",
       "4        True\n",
       "        ...  \n",
       "3502    False\n",
       "3503    False\n",
       "3504    False\n",
       "3505    False\n",
       "3506    False\n",
       "Name: positionName, Length: 3507, dtype: bool"
      ]
     },
     "execution_count": 266,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# contains这个是字符串中方法，进行逻辑判断，是否含有\n",
    "cond = job['positionName'].str.contains('数据分析')\n",
    "cond"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 267,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1652, 13)"
      ]
     },
     "execution_count": 267,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job = job[cond]\n",
    "job.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 268,
   "metadata": {},
   "outputs": [],
   "source": [
    "job.reset_index(inplace=True) # 重置行索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 269,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>level_0</th>\n",
       "      <th>index</th>\n",
       "      <th>positionName</th>\n",
       "      <th>companyShortName</th>\n",
       "      <th>city</th>\n",
       "      <th>companySize</th>\n",
       "      <th>education</th>\n",
       "      <th>financeStage</th>\n",
       "      <th>industryField</th>\n",
       "      <th>salary</th>\n",
       "      <th>workYear</th>\n",
       "      <th>hitags</th>\n",
       "      <th>companyLabelList</th>\n",
       "      <th>job_detail</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>拉勾网</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>本科</td>\n",
       "      <td>D轮及以上</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>25k-35k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>[\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...</td>\n",
       "      <td>[\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]</td>\n",
       "      <td>\\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>OK Group</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>B轮</td>\n",
       "      <td>金融</td>\n",
       "      <td>25k-45k</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]</td>\n",
       "      <td>\\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>15k-25k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>电商</td>\n",
       "      <td>15k-30k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>[\"免费班车\",\"免费体检\",\"地铁周边\"]</td>\n",
       "      <td>[\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]</td>\n",
       "      <td>\\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1647</th>\n",
       "      <td>3177</td>\n",
       "      <td>3352</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>华泛信息</td>\n",
       "      <td>苏州</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>大专</td>\n",
       "      <td>不需要融资</td>\n",
       "      <td>移动互联网,其他</td>\n",
       "      <td>10k-15k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"技能培训\",\"节日礼物\",\"带薪年假\",\"绩效奖金\"]</td>\n",
       "      <td>\\n岗位职责：\\n深入了解项目组的业务需求,在此基础上进行数据收集、数据分析、商业报告的撰写...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1648</th>\n",
       "      <td>3178</td>\n",
       "      <td>3353</td>\n",
       "      <td>大数据分析师</td>\n",
       "      <td>德融嘉信</td>\n",
       "      <td>苏州</td>\n",
       "      <td>50-150人</td>\n",
       "      <td>本科</td>\n",
       "      <td>不需要融资</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>6k-12k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[]</td>\n",
       "      <td>\\n岗位职责：\\n1. 开展业务专题分析，使用数据挖掘各类算法构建相关的业务模型，完成业务分...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1649</th>\n",
       "      <td>3404</td>\n",
       "      <td>3580</td>\n",
       "      <td>ETL/大数据/数据分析/实施</td>\n",
       "      <td>格蒂电力</td>\n",
       "      <td>天津</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>未融资</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>6k-12k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"技能培训\",\"带薪年假\",\"绩效奖金\",\"岗位晋升\"]</td>\n",
       "      <td>\\n工作职责\\n1.   负责数据接入、数据整合中的链路配置与调度配置工作。\\n职位要求\\n...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1650</th>\n",
       "      <td>3405</td>\n",
       "      <td>3581</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>吉城美家</td>\n",
       "      <td>天津</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>未融资</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>7k-14k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"五险一金\",\"岗位晋升\"]</td>\n",
       "      <td>\\n负责站点日常数据分析、提前通过数据分析对业务有预测性、通过数据说话、解决站点管理问题、\\n</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1651</th>\n",
       "      <td>3406</td>\n",
       "      <td>3582</td>\n",
       "      <td>数据分析支持</td>\n",
       "      <td>云链供应链</td>\n",
       "      <td>天津</td>\n",
       "      <td>15-50人</td>\n",
       "      <td>本科</td>\n",
       "      <td>未融资</td>\n",
       "      <td>金融,企业服务</td>\n",
       "      <td>4k-6k</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[]</td>\n",
       "      <td>\\n        岗位职责：\\n1、负责部门日常数据报表的制定、维护、优化；\\n2、支持运...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1652 rows × 14 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      level_0  index     positionName companyShortName city companySize  \\\n",
       "0           0      0          高级数据分析师              拉勾网   北京   500-2000人   \n",
       "1           1      1            数据分析师         OK Group   北京   500-2000人   \n",
       "2           2      2          高级数据分析师           金山办公软件   北京     2000人以上   \n",
       "3           3      3            数据分析师           金山办公软件   北京     2000人以上   \n",
       "4           4      4            数据分析师             京东集团   北京     2000人以上   \n",
       "...       ...    ...              ...              ...  ...         ...   \n",
       "1647     3177   3352            数据分析师             华泛信息   苏州     2000人以上   \n",
       "1648     3178   3353           大数据分析师             德融嘉信   苏州     50-150人   \n",
       "1649     3404   3580  ETL/大数据/数据分析/实施             格蒂电力   天津   500-2000人   \n",
       "1650     3405   3581            数据分析师             吉城美家   天津     2000人以上   \n",
       "1651     3406   3582           数据分析支持            云链供应链   天津      15-50人   \n",
       "\n",
       "     education financeStage industryField   salary workYear  \\\n",
       "0           本科        D轮及以上          企业服务  25k-35k    5-10年   \n",
       "1           大专           B轮            金融  25k-45k    5-10年   \n",
       "2           本科         上市公司         移动互联网  15k-25k     3-5年   \n",
       "3           本科         上市公司         移动互联网  15k-25k     1-3年   \n",
       "4           本科         上市公司            电商  15k-30k     3-5年   \n",
       "...        ...          ...           ...      ...      ...   \n",
       "1647        大专        不需要融资      移动互联网,其他  10k-15k     1-3年   \n",
       "1648        本科        不需要融资         移动互联网   6k-12k     1-3年   \n",
       "1649        大专          未融资          企业服务   6k-12k     3-5年   \n",
       "1650        本科          未融资         移动互联网   7k-14k     1-3年   \n",
       "1651        本科          未融资       金融,企业服务    4k-6k     1-3年   \n",
       "\n",
       "                                                 hitags  \\\n",
       "0     [\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...   \n",
       "1                                                   NaN   \n",
       "2                                                   NaN   \n",
       "3                                                   NaN   \n",
       "4                                [\"免费班车\",\"免费体检\",\"地铁周边\"]   \n",
       "...                                                 ...   \n",
       "1647                                                NaN   \n",
       "1648                                                NaN   \n",
       "1649                                                NaN   \n",
       "1650                                                NaN   \n",
       "1651                                                NaN   \n",
       "\n",
       "                   companyLabelList  \\\n",
       "0     [\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]   \n",
       "1      [\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]   \n",
       "2     [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "3     [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "4     [\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]   \n",
       "...                             ...   \n",
       "1647  [\"技能培训\",\"节日礼物\",\"带薪年假\",\"绩效奖金\"]   \n",
       "1648                             []   \n",
       "1649  [\"技能培训\",\"带薪年假\",\"绩效奖金\",\"岗位晋升\"]   \n",
       "1650                [\"五险一金\",\"岗位晋升\"]   \n",
       "1651                             []   \n",
       "\n",
       "                                             job_detail  \n",
       "0     \\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...  \n",
       "1     \\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...  \n",
       "2     \\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...  \n",
       "3     \\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...  \n",
       "4     \\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...  \n",
       "...                                                 ...  \n",
       "1647  \\n岗位职责：\\n深入了解项目组的业务需求,在此基础上进行数据收集、数据分析、商业报告的撰写...  \n",
       "1648  \\n岗位职责：\\n1. 开展业务专题分析，使用数据挖掘各类算法构建相关的业务模型，完成业务分...  \n",
       "1649  \\n工作职责\\n1.   负责数据接入、数据整合中的链路配置与调度配置工作。\\n职位要求\\n...  \n",
       "1650    \\n负责站点日常数据分析、提前通过数据分析对业务有预测性、通过数据说话、解决站点管理问题、\\n  \n",
       "1651  \\n        岗位职责：\\n1、负责部门日常数据报表的制定、维护、优化；\\n2、支持运...  \n",
       "\n",
       "[1652 rows x 14 columns]"
      ]
     },
     "execution_count": 269,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 薪水"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 270,
   "metadata": {},
   "outputs": [],
   "source": [
    "# applymap和map类似的，map操作Series，applymap操作的DataFrame\n",
    "job['salary'] = job['salary'].str.lower().str.extract(r'(\\d+)[k]-(\\d+)[k]')\\\n",
    "             .applymap(lambda x : int(x)).mean(axis = 1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 技能要求"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Python  \n",
    "SQL  \n",
    "Tableau  \n",
    "Excel  \n",
    "SPSS/SAS  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 271,
   "metadata": {},
   "outputs": [],
   "source": [
    "job['job_detail'] = job['job_detail'].str.lower() # 变成小写"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 272,
   "metadata": {},
   "outputs": [],
   "source": [
    "job['Python'] = job['job_detail'].map(lambda x :1 if 'python' in x else 0)\n",
    "job['SQL'] = job['job_detail'].map(lambda x : 1 if 'sql' in x else 0)\n",
    "job['Tableau'] = job['job_detail'].map(lambda x :1 if 'tableau' in x else 0)\n",
    "job['Excel'] = job['job_detail'].map(lambda x :1 if 'excel' in x else 0)\n",
    "job['SPSS/SAS'] = job['job_detail'].map(lambda x :1 if ('spss' in x) or ('sas' in x) else 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 273,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>level_0</th>\n",
       "      <th>index</th>\n",
       "      <th>positionName</th>\n",
       "      <th>companyShortName</th>\n",
       "      <th>city</th>\n",
       "      <th>companySize</th>\n",
       "      <th>education</th>\n",
       "      <th>financeStage</th>\n",
       "      <th>industryField</th>\n",
       "      <th>salary</th>\n",
       "      <th>workYear</th>\n",
       "      <th>hitags</th>\n",
       "      <th>companyLabelList</th>\n",
       "      <th>job_detail</th>\n",
       "      <th>Python</th>\n",
       "      <th>SQL</th>\n",
       "      <th>Tableau</th>\n",
       "      <th>Excel</th>\n",
       "      <th>SPSS/SAS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>拉勾网</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>本科</td>\n",
       "      <td>D轮及以上</td>\n",
       "      <td>企业服务</td>\n",
       "      <td>30.0</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>[\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...</td>\n",
       "      <td>[\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]</td>\n",
       "      <td>\\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>OK Group</td>\n",
       "      <td>北京</td>\n",
       "      <td>500-2000人</td>\n",
       "      <td>大专</td>\n",
       "      <td>B轮</td>\n",
       "      <td>金融</td>\n",
       "      <td>35.0</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]</td>\n",
       "      <td>\\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>高级数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>20.0</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>金山办公软件</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>移动互联网</td>\n",
       "      <td>20.0</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>NaN</td>\n",
       "      <td>[\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]</td>\n",
       "      <td>\\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>数据分析师</td>\n",
       "      <td>京东集团</td>\n",
       "      <td>北京</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>本科</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>电商</td>\n",
       "      <td>22.5</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>[\"免费班车\",\"免费体检\",\"地铁周边\"]</td>\n",
       "      <td>[\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]</td>\n",
       "      <td>\\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   level_0  index positionName companyShortName city companySize education  \\\n",
       "0        0      0      高级数据分析师              拉勾网   北京   500-2000人        本科   \n",
       "1        1      1        数据分析师         OK Group   北京   500-2000人        大专   \n",
       "2        2      2      高级数据分析师           金山办公软件   北京     2000人以上        本科   \n",
       "3        3      3        数据分析师           金山办公软件   北京     2000人以上        本科   \n",
       "4        4      4        数据分析师             京东集团   北京     2000人以上        本科   \n",
       "\n",
       "  financeStage industryField  salary workYear  \\\n",
       "0        D轮及以上          企业服务    30.0    5-10年   \n",
       "1           B轮            金融    35.0    5-10年   \n",
       "2         上市公司         移动互联网    20.0     3-5年   \n",
       "3         上市公司         移动互联网    20.0     1-3年   \n",
       "4         上市公司            电商    22.5     3-5年   \n",
       "\n",
       "                                              hitags  \\\n",
       "0  [\"免费下午茶\",\"ipo倒计时\",\"bat背景\",\"地铁周边\",\"每天管两餐\",\"定期团建...   \n",
       "1                                                NaN   \n",
       "2                                                NaN   \n",
       "3                                                NaN   \n",
       "4                             [\"免费班车\",\"免费体检\",\"地铁周边\"]   \n",
       "\n",
       "                companyLabelList  \\\n",
       "0  [\"五险一金\",\"弹性工作\",\"带薪年假\",\"免费两餐\"]   \n",
       "1   [\"节日礼物\",\"年度旅游\",\"扁平管理\",\"领导好\"]   \n",
       "2  [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "3  [\"年底双薪\",\"节日礼物\",\"技能培训\",\"绩效奖金\"]   \n",
       "4  [\"五险一金\",\"带薪年假\",\"免费班车\",\"定期体检\"]   \n",
       "\n",
       "                                          job_detail  Python  SQL  Tableau  \\\n",
       "0  \\n1.搭建数据指标框架，完整并准确反映业务趋势和变化，及时发现和定位问题\\n2.独立完成数...       1    1        0   \n",
       "1  \\n工作职责：\\n1. 负责建立交易平台日常分析体系，包括核心指标体系、报表体系，专题活动分...       0    1        0   \n",
       "2  \\n职位描述：1.对亿计的办公用户数据进行深度挖掘，引导产品、运营，并能实际应用到业务中带来...       1    1        0   \n",
       "3  \\n工作职责：-负责日常运营、业务数据等分析-针对产品需求做深入的数据分析报告，分析用户行为...       0    1        0   \n",
       "4  \\n【数据分析师岗】\\n岗位要求：\\n1、构建及维护客户体验相关数据报表平台；\\n2、与大数...       0    1        1   \n",
       "\n",
       "   Excel  SPSS/SAS  \n",
       "0      0         0  \n",
       "1      0         0  \n",
       "2      0         0  \n",
       "3      0         1  \n",
       "4      1         1  "
      ]
     },
     "execution_count": 273,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 行业信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 274,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0           企业服务\n",
       "1             金融\n",
       "2          移动互联网\n",
       "3          移动互联网\n",
       "4             电商\n",
       "5             教育\n",
       "6             金融\n",
       "7          移动互联网\n",
       "8     移动互联网,消费生活\n",
       "9          移动互联网\n",
       "10      移动互联网,电商\n",
       "11       游戏,数据服务\n",
       "12      移动互联网,电商\n",
       "13      移动互联网,电商\n",
       "14          消费生活\n",
       "15         移动互联网\n",
       "16      移动互联网,金融\n",
       "17            硬件\n",
       "18            教育\n",
       "19    移动互联网,数据服务\n",
       "20      移动互联网,教育\n",
       "21         文娱丨内容\n",
       "22         移动互联网\n",
       "23      移动互联网,教育\n",
       "24    移动互联网,数据服务\n",
       "25      移动互联网,社交\n",
       "26    移动互联网,数据服务\n",
       "27            金融\n",
       "28    移动互联网,数据服务\n",
       "29    移动互联网,数据服务\n",
       "Name: industryField, dtype: object"
      ]
     },
     "execution_count": 274,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job['industryField'][:30]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 275,
   "metadata": {},
   "outputs": [],
   "source": [
    "def convert(x):\n",
    "    field = x.split(',')\n",
    "    if (field[0] == '移动互联网') & (len(field) > 1):\n",
    "        return field[1]\n",
    "    else:\n",
    "        return field[0]\n",
    "job['industryField'] = job.industryField.map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 276,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0      企业服务\n",
       "1        金融\n",
       "2     移动互联网\n",
       "3     移动互联网\n",
       "4        电商\n",
       "5        教育\n",
       "6        金融\n",
       "7     移动互联网\n",
       "8      消费生活\n",
       "9     移动互联网\n",
       "10       电商\n",
       "11       游戏\n",
       "12       电商\n",
       "13       电商\n",
       "14     消费生活\n",
       "15    移动互联网\n",
       "16       金融\n",
       "17       硬件\n",
       "18       教育\n",
       "19     数据服务\n",
       "20       教育\n",
       "21    文娱丨内容\n",
       "22    移动互联网\n",
       "23       教育\n",
       "24     数据服务\n",
       "25       社交\n",
       "26     数据服务\n",
       "27       金融\n",
       "28     数据服务\n",
       "29     数据服务\n",
       "Name: industryField, dtype: object"
      ]
     },
     "execution_count": 276,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job.industryField[:30]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
